Question: please type the python code that follows this description . steps 1-3 are for one python program. will rate postive if you check and make
3. Write a Python program stored in a file L4q3.py that: - Gets single-digit numbers from the user on one line (digits are separated by white space) and adds them to a list. The first digit and the last digit should not be a zero. If the user provides an invalid entry, the program should prompt for a new value. - Converts every entry in the list to an integer and prints the list. The digits in the list represent a nonnegative integer. For example, if the list is [4,5,9,1], the entries represent the integer 4591 . The most significant digit is at the zeroth index of the list. - Adds the integer that the reversed value of the integer. For example, if the list is [4,5,9,1], the addition will be 4591+1954=6545 and the resulting list will be [6,5,4,5] Sample Output\#1: 2. Enter single digits separated by one space: 0511 3. Invalid list, try again. 5. Enter single digits separated by one space: 8590 6. Invalid list, try again. 8. Enter single digits separated by one space: 058114 9. Invalid list, try again. 10. 11. Enter single digits separated by one space: 4591 12. The initial list is: [4,5,9,1] 13. The reversed list is: [1,9,5,4] 14. The addition list is: [6,5,4,5]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
