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
5
Answer:
Explanation:idk
Answered by
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
Math,
6 months ago
English,
6 months ago
History,
6 months ago
Physics,
1 year ago
English,
1 year ago
Political Science,
1 year ago
Social Sciences,
1 year ago