// Functions

Functions Quiz

// question 1 of 10
What is printed? def add(a
// question 2 of 10
What is printed? x=1 ; def f(): global x ; x=3 ; f() ; print(x)?
// question 3 of 10
What is printed? def f(x): return x == 5 ; print(f(5))?
// question 4 of 10
What is printed? def f(x): return x != 0 ; print(f(0))?
// question 5 of 10
What is printed? def f(x): return bool(x) ; print(f(0))?
// question 6 of 10
What value does x have? x=5 ; def f(): x=2 ; f() ; print(x)?
// question 7 of 10
What is printed? def cube(x): return x**3 ; print(cube(2))?
// question 8 of 10
What is printed? def f(x): return x//2 ; print(f(5))?
// question 9 of 10
What is printed? def f(a,b): return a or b ; print(f(False,True))?
// question 10 of 10
What is printed? def f(x): return x%2==0 ; print(f(5))?