Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python (.py file) You have been hired by an educational software company to create a program that automatically calculates the sum of each place-value of
Python (.py file)
You have been hired by an educational software company to create a program that automatically calculates the sum of each place-value of two numbers. You can assume that the user of this program will only enter positive whole numbers greater than zero and less than 10,000. Here are a few sample runnings of the program (note that you do not need to print "RESTART"-that line was automatically generated when the program was run in IDLE): Enter value 1: 57 Enter value 2: 3 Place Value Totals 7+3 10 one(s) 5 5 ten(s) 0+00 hundred (s) 0+00thousand (s) RESTART SS5 Enter value 1: 1532 Enter value 2: 15 Place Value Totals: 25 7 one(s) 3 +14 ten(s) 5 + 0 = 5 hundred (s) 1+0 1 thousand (s) Enter value 1: 0 Enter value 2: 9999 Place Value Totals: 09 9 one(s) 0+9 9 ten(s) 09 9 hundred (s) 0+9 9 thousand (s) RESTART Enter value 1: 375 Enter value 2: 932 Place Value Totals: 5+2=7one(s) 7+3- 10 ten(s) 3 9 12 hundred (s) 0+00 thousand (s) Hint:Think about how you isolate the "ones" digit from both numbers. Is there a math operation that you can use to extract this information? Look back at "warm-up" exercise #2 if you need another hint. Hint: Once you isolate the "ones" digit you then need to move on to the "tens" digit. One way to do this would be to "throw away" the ones digit so you can focus your attention on the "tens" digit. Is there a way you can do this using a math operation? Comment your source code and describe your code to someone who may be viewing it for the first time. Also include your name, the date, your class section and the name of your program at the top of your file
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started