#Write a program that reads one 3-digit positive integer. The #program checks whether at least #one of the digits equals 3. #Discussion #Input: one integer between 100 and 999, stored in variable num #Calculations: #Example 1: num=567 #last=num%10=567%10=7 #num=num//10=567//10=56 #middle=num%10=56%10=6 #num=num//10=56//10=5 #first=num%10=5%10=5 #Example 2: num=891 #last=891%10=1 #num=num//10=89 #middle=num%10=89%10=9 #num=num//10=8 #first=num%10=8%10=8 #to check if at least one of the digits equals 3 we need to use #if/else and logical operators #Input limits: num>=100 and num<=999 #Program #Input num=int(input("enter 3-digit positive int ")) #Calculations: if(num>=100 and num<=999): last=num%10 num=num//10 middle=num%10 num=num//10 first=num%10 print("the digits are", first, middle, last) if(first==3 or middle==3 or last==3): print("at least one digit equals 3") else: print("none of digits equals 3") else: print("Invalid input")