#Write a Python program that prompts the user to #three-digit positive integer number. #The program separates the input number into it's individual #digits and prints the digits on separate lines. For example if the input #number was 236 the program will print #2 #3 #6 #three-digit positive integer - is a number between 100 and 999 #the program must separate digits #Example: #input 256 = (2*100+5*10+6)%10 = 6 #256 dollars and something cost 10 dollars #how many items can you buy? 25 items 256//10 = 25 #how much money left? 6 256 %10 = 6 #we are using decimal system - base 10 #we need to continue with 25 #25//10=2 25%10=5 #we need to continue with 2 #2//10 = 0 2%10=2 #we separated all digits using integer division and modulo 10 operations #input 679 = (6*100+7*10+9) #679 dollars and something cost 10 dollars #how many items can you buy? 67 679//10 = 67 #how much money left? 9 679%10 = 9 #Example: input 378 #to separate digits we will use integer division by 10 #and modulo (remainder) 10 #last_digit=378%108 #378//10=37 #mid_digit=37%10=7 #37//10=3 #first_digit=3%10=3 #Discussion: #Input: one three-digit positive integer, the number between 100 and 999 #stored in variable num #Output: digits printed on different lines, we will store individual digits #in variables first_digit, mid_digit and last_digit #Input Limitations: integer between 100 and 999 inclusive. #Calculations: integer divisio by 10 and modulo 10 #Part 1 Input: num=int(input("enter integer between 100 and 999 ")) #Part 2 Calculation: last_digit = num%10 num = num//10 mid_digit = num%10 num = num//10 first_digit = num%10 #Part 3 Output: print(first_digit) print(mid_digit) print(last_digit)