Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If anyone could help me with this code, I would greatly appreciate it!! Thanks in advance! It's in python! You have been hired by an

image text in transcribedIf anyone could help me with this code, I would greatly appreciate it!! Thanks in advance! It's in python!

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 + 0 = 5 ten(s) 0 + 0 = 0 hundred(s) 0 + 0 = 0 thousand(s) >>> EEEEEEEEEEEEEEEEE=============== RESTART >>> Enter value 1: 1532 Enter value 2: 15 EEN== Place Value Totals: 2 + 5 = 7 one(s) 3 + 1 = 4 ten(s) 5 + 0 = 5 hundred(s) 1 + 0 = 1 thousand(s) >>> EEEEEE============= SSSSSSS RESTART ESSESESSE Enter value 1: 0 Enter value 2: 9999 Place Value Totals: 0 + 9 = 9 one(s) 0 + 9 = 9 ten(s) 0 + 9 = 9 hundred(s) 0 + 9 = 9 thousand(s) >>> ================================ >>> Enter value 1: 375 Enter value 2: 932 RESTART =========== Place Value Totals: 5 + 2 = 7 one(s) 7 + 3 = 10 ten(s) 3 + 9 = 12 hundred(s) 0 + 0 = 0 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

=+Are there shop stewards?

Answered: 1 week ago