Advertisement
Toma252

3.1

Oct 16th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. # This program provides remainder when dividing any whole number with 10#
  2. #########################################################################
  3.  
  4. # Number to be entered
  5. X = int(input("Please enter a whole number: "))
  6.  
  7. # Divide user's entry by 10
  8. # Using // to get whole number
  9. Y = X // 10
  10.  
  11. # Calculating remainder
  12. Z = (X - (Y * 10))
  13.  
  14. # Print the result
  15. print("\n")
  16. print("The remainder when you divide %d with 10 is %d." % (X, Z))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement