blahedo

0914-3

Sep 14th, 2026
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1. #in-class 14 Sep
  2.  
  3. stuff = input()
  4. print("Length:", len(stuff))
  5.  
  6.  
  7. '''
  8. print (17 // 2)
  9. print (17 % 2)
  10. print (234234628 % 2)
  11.  
  12. num = int(input("Type a positive integer "))
  13. print ( (num // 10)  % 10, "tens digit")
  14. print ( num % 10, "ones")
  15. # 47 ->   4 tens  7 ones
  16. '''
  17.  
  18. cents = int(input("Type a number of cents (mult of 5): "))
  19. '''
  20. # 65  ->  6 dimes  1 nickel
  21. dimes = cents // 10
  22. nickels = (cents % 10) // 5
  23. print ( dimes, "dimes and", nickels , "nickels")
  24. '''
  25. # 65  -> 2 quarters  1 dimes  1 nickels
  26. quarters = cents // 25
  27. dimes = (cents % 25) // 10
  28. nickels = (cents - (quarters * 25 + dimes * 10)) // 5
  29. print ( quarters, "quarters,", dimes, "dimes, and", nickels , "nickels")
  30.  
Advertisement
Add Comment
Please, Sign In to add comment