Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #in-class 14 Sep
- stuff = input()
- print("Length:", len(stuff))
- '''
- print (17 // 2)
- print (17 % 2)
- print (234234628 % 2)
- num = int(input("Type a positive integer "))
- print ( (num // 10) % 10, "tens digit")
- print ( num % 10, "ones")
- # 47 -> 4 tens 7 ones
- '''
- cents = int(input("Type a number of cents (mult of 5): "))
- '''
- # 65 -> 6 dimes 1 nickel
- dimes = cents // 10
- nickels = (cents % 10) // 5
- print ( dimes, "dimes and", nickels , "nickels")
- '''
- # 65 -> 2 quarters 1 dimes 1 nickels
- quarters = cents // 25
- dimes = (cents % 25) // 10
- nickels = (cents - (quarters * 25 + dimes * 10)) // 5
- print ( quarters, "quarters,", dimes, "dimes, and", nickels , "nickels")
Advertisement
Add Comment
Please, Sign In to add comment