// Functions

Functions Quiz

// question 1 of 10
What does as do in except Exception as e?
// question 2 of 10
What is printed? def a(): return 2 ; def b(): return a()+1 ; print(b())?
// question 3 of 10
What does return do?
// question 4 of 10
What is a local variable?
// question 5 of 10
What is printed? def f(x): if x>0: return ""P"" else: return ""N"" ; print(f(1))?
// question 6 of 10
What is printed? try: print(5/0) except: print(""Err"")?
// question 7 of 10
What is printed? try: print(1/0) except: print(""Err"") finally: print(""Done"")?
// question 8 of 10
What is printed? def square(x): return x*x ; print(square(3))?
// question 9 of 10
What is printed? def f(a,b): print(a+b) ; f(2,3)?
// question 10 of 10
What is printed? def f(a,b=2): return a+b ; print(f(3))?