''' digits.py DS2000 Spring 2022 Isolating hundreds, tens, and ones places Test cases: 167 -- 1, 6, 7 64 -- 0, 6, 4 1024 -- 0, 2, 4 ''' def main(): # Step one: gather data. Prompt the user for a number. num = int(input("Enter a number\n")) # Step two: computations. Figure out the ones, tens, hundreds. ones = num % 10 tens = (num // 10) % 10 hundreds = (num // 100) % 10 # Step three: communicate! Print out the results print("Ones place:", ones) print("Tens place:", tens) print("Hundreds place:", hundreds) main()