Question: [python] 7. [2] Consider rounding positive integers to the nearest multiple of ten: if the last digit of a given integer is 1, 2, 3,

 [python] 7. [2] Consider rounding positive integers to the nearest multipleof ten: if the last digit of a given integer is 1,

[python]

7. [2] Consider rounding positive integers to the nearest multiple of ten: if the last digit of a given integer is 1, 2, 3, or 4, the number is rounded down (e.g., 12 is rounded to 10, 193 is rounded to 190, 442 is rounded to 440, etc.); otherwise it is rounded up (e.g., 66 is rounded to 70, 138 is rounded to 140, 5555 is rounded to 5560, etc.) For a given positive integer num return its value rounded to the nearest multiple of ten. 111111 def round10(num): For a given positive integer num, round it to the nearest multiple of 10. # insert your code here

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!