while loop asks the function more whether to go on. That function also shows the number it was given.
def more(n):
print(n, end=" ")
return n < 3
n = 0
while more(n):
n += 2
print("end")
What does the program print?Log in to join the discussion.
Loading…