Question
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
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).
Hint(s):
(a) Think about how you isolate the ones digit from both numbers. Is there a math operation that you can use to extract this information?
(b) 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?
Enter value 1:57 Enter value 2: 3 Place Value Totals: 7 + 3 - 10 e(s) 5+0 - 5 tem(s) 0 +0 -0 hundred (s) 0 +0 -0 thousand(s) - PESTART Enter value 1: 1532 Enter value 215 Place Value Totals: 2 +5 7 one(s) 3 + 1 - 4 ton(s) 5 + 0-5 hundred (s) 1 + 0 = 1 thousand(s) - RESTART Enter value 1: 0 Enter value 2 : 9999 Place Value Totals: 0 + 9 9 ona(s) 0 + 9 = 9 ton(s) 0 + 9 - 9 hundred (s) 0 + 9 thousand (s) RESTART Enter value 1: 375 Enter value 2: 932 Place Value Totals: 5+ 2=7 one(s) 7 + 3 - 10 tem(s) 3 + 9 - 12 hundred(s) OOO thousand(s)
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