// Functions

Functions Quiz

// question 1 of 10
What happens if you call an undefined function?
// 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(): return [1
// question 4 of 10
What is printed? try: print(""A"") except: print(""B"")?
// question 5 of 10
What is printed? def f(a,b): return a+b ; print(f(2,3))?
// question 6 of 10
Can a function call another function?
// question 7 of 10
What is printed? def f(x): return x*3 ; print(f(4))?
// question 8 of 10
What is printed? def greet(name): return ""Hi ""+name ; print(greet(""Ana""))?
// question 9 of 10
What is printed? try: print([1,2][5]) except IndexError: print(""Index"")?
// question 10 of 10
What happens if you divide by zero inside try?