// Functions

Functions Quiz

// question 1 of 10
What is printed? x=5 ; def f(): x=2 ; print(x) ; f()?
// question 2 of 10
What is printed? def f(x): return x[0] ; print(f(""abc""))?
// question 3 of 10
What is printed? x=10 ; def f(): print(x+5) ; f()?
// question 4 of 10
What is printed? x=1 ; def f(): global x ; x=3 ; f() ; print(x)?
// question 5 of 10
What is printed? def f(x): return x+1 ; print(f(2))?
// question 6 of 10
What is printed? def greet(name): return ""Hi ""+name ; print(greet(""Ana""))?
// question 7 of 10
What does except ValueError do?
// question 8 of 10
What is printed? try: print(""A"") finally: print(""B"")?
// question 9 of 10
What is printed? def f(x): return x%2 ; print(f(5))?
// question 10 of 10
Can a function call another function?