id/email
password
forgot password | create account
about | help | prefs
ReadingBatcode reading practice

 

 

Athenian: Loopswhile3

prev  |  next  |  chance

What value is returned?

def run_it(x):
    while x > 10:
        if x % 3 == 0:
            return 2
        else:
            x -= 5
    return x
Function Call  Return Value
run_it(10)
run_it(21)
run_it(5)  
run_it(25)
run_it(14)

Experiment with this code on Gitpod.io

⬅ Back