// Functions

Functions Quiz

// question 1 of 10
What is printed? x=10 ; def f(): print(x+5) ; f()?
// question 2 of 10
What is printed? def f(x): return x[:2] ; print(f(""python""))?
// question 3 of 10
What is printed? def f(x): return x//2 ; print(f(5))?
// question 4 of 10
What is printed? def square(x): return x*x ; print(square(3))?
// question 5 of 10
What is printed? try: print(10/2) except ZeroDivisionError: print(""Err"")?
// 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? try: print(""A"") finally: print(""B"")?
// question 8 of 10
What happens if you divide by zero inside try?
// question 9 of 10
What is printed? try: print(""A"") finally: print(""Done"")?
// question 10 of 10
What is printed? x=5 ; def f(): print(x) ; f()?