Computer Science, asked by vrindashageela8831, 1 year ago

write a program in python to take N(N>20)as an input from the user .print number from 11 to N .when the number is a multiply of 3 print "tipsy',when it is a multiply of 7,print"topsy",when it is a multiply of both ,print "tipsy topsy"

Answers

Answered by rahulamde
5

Answer:

Explanation:idk

Answered by dhruvgiri27
9

Answer:

inp = int(input("ENTER ANY NUMBER GREATER THAN '20'  -   "))

if (inp < 20):

   print("ERROR, INPUT NUMBER SHOULD BE GREATER THAN 20")

else:

   for i in range(11,inp + 1,1):

       if(i%3 == 0 and i%7 == 0):

           print("TIPSYTOPSY")

       elif (i%3 == 0):

           print("TIPSY")

       elif(i%7 == 0):

           print("TOPSY")

       else:

           print(i)

Explanation:

IT WORKS

Similar questions