Task 11 Write a Python program which takes a number and prints the digits from the unit place, then the tenth, then hundredth, etc. (Right to Left) [Consider the input number to be an INTEGER. You are...




Must show it in Python:



Please show step by step with comments.



Please show it in simplest form.



Please don't use any functions




Please don't use any def func ()


Task 11<br>Write a Python program which takes a number and prints the digits from the unit place, then the tenth, then hundredth, etc. (Right to Left)<br>[Consider the input number to be an INTEGER. You are not allowed to use String indexing for solving this task]<br>Example: If the user gives 32768, then print 8, 6, 7, 2, 3<br>==================================================== ====================<br>Hint (1): The input) function, converts the input data to String data type by default. Use this knowledge to solve this problem.<br>Hint (2): First to get the digit from the right side, take the remainder of the number using modulus (%) operator and print the digit. For dropping the last<br>digit, perform floor division by 10 on the number. Then start over.<br>32,768 % 10 = 8<br>32,768 // 10 = 3, 276<br>3, 276 % 10 = 6<br>3, 276 // 10 = 327<br>327 % 10 = 7<br>327 // 10 = 32<br>32 % 10 = 2<br>32 //10 = 3<br>3 % 10 = 3<br>3 // 10 = 0<br>Done! When the number becomes 0 your loop should end.<br>

Extracted text: Task 11 Write a Python program which takes a number and prints the digits from the unit place, then the tenth, then hundredth, etc. (Right to Left) [Consider the input number to be an INTEGER. You are not allowed to use String indexing for solving this task] Example: If the user gives 32768, then print 8, 6, 7, 2, 3 ==================================================== ==================== Hint (1): The input) function, converts the input data to String data type by default. Use this knowledge to solve this problem. Hint (2): First to get the digit from the right side, take the remainder of the number using modulus (%) operator and print the digit. For dropping the last digit, perform floor division by 10 on the number. Then start over. 32,768 % 10 = 8 32,768 // 10 = 3, 276 3, 276 % 10 = 6 3, 276 // 10 = 327 327 % 10 = 7 327 // 10 = 32 32 % 10 = 2 32 //10 = 3 3 % 10 = 3 3 // 10 = 0 Done! When the number becomes 0 your loop should end.

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here