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

 

 

Athenian: Conditionalscalculator

prev  |  next  |  chance

Predict the returned value
by Savonnah '23

def calc(num):
    if num <= 10:
        result = num * 2
    else:
        result = num * 10
    return result
Function Call  Return Value
calc(1)      
calc(41)    
calc(-5)    
calc(3)      
calc(10)    

Experiment with this code on Gitpod.io

⬅ Back