Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
# Suppose you want num = 5 def check(num): if num == 5: return False else : return True num = int(input()) while(check(num)): num = int(input()) # while loop will ends as soon as user hits 5!
13th Feb 2018, 2:42 PM
777
777 - avatar