Question: Using python you will implement a function called myReverse() that, given a single input inputNum which is a 4-digit positive integer (i.e., an integer between

Using python you will implement a function called myReverse() that, given a single input inputNum which is a 4-digit positive integer (i.e., an integer between 0 and 9999), returns an integer which is the number in reverse. For example myReverse(1234) should return 4321 and myReverse(5) should return 5000. You must use the % function at least once!

HINT: Create four variables called one_digit, ten_digit, hundred_digit, and thousand_digit.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!