[Solved]Build Phone Number Digits Entered User Program Loop 10 Valid Digits Entered Use Digits Dis Q37106248
build a phone number from digits entered by your user. Yourprogram will loop until 10 valid digits have been entered. It willthen use those digits to display the phone number entered using theformat: XXXXXXXXXX (or (XXX) XXX – XXXX for extra credit). Theprogram will ask for a digit, it will check to see if the digit isactually between 0 and 9 inclusively. If so, the digit will bestored as the next number in the phone number. Once all digits areentered, the program will display the phone number. Hint: Rememberthat str(num) will convert any num into a string. Here is a typicalprogram run. The sample user input is shown in blue italics.
Input: Enter a digit: 1 Enter a digit: 4 Enter a digit: 11 Entera digit: 2 Enter a digit: 0 Enter a digit: 21 Enter a digit: 7Enter a digit: 9 Enter a digit: 1 Enter a digit: 0 Enter a digit: 5Enter a digit: 4 Output: 1420791054 (or (142) 079 – 1054 for extracredit) Before beginning this project, you will document youralgorithm as a list of steps to take you from your inputs to youroutputs. Each step will be added as a comment block within yourcode. You will have the comment block right above the code thatperforms the actions specified. 2 For example, before your lines ofcode that ask the user for inputs, you would have a comment blockthat states what inputs you are requesting from the user.
Please see the example code provided as a sample of this. Thisand all program files in this course must include a comment blockat the beginning (top) of the source code file that contains:
• your name
• the Python program name
• project description
• the date
The comment lines should look like this:
#############################################################################
Your name #
Python program name #
Project description #
The date
############################################################################
Expert Answer
Answer to build a phone number from digits entered by your user. Your program will loop until 10 valid digits have been entered. I… . . .
OR

