<
RHD
/>
Home
Blog
Quiz
Resources
About
Contact
Enlist
// guest
▾
Login
Request Account
[ light ]
// Functions
Functions Quiz
// question 1 of 10
What is an argument?
Value passed to function
Loop condition
Function name
// question 2 of 10
What does a function return without return?
False
0
None
// question 3 of 10
What is printed? def f(x): return x or False ; print(f(True))?
False
None
True
// question 4 of 10
What is printed? def greet(name): return ""Hi ""+name ; print(greet(""Ana""))?
Hi Ana
Error
Ana Hi
// question 5 of 10
What is printed? def f(): print(""Hi"") ; print(f())?
Error
Hi then None
Hi
// question 6 of 10
What is printed? def f(x): return not x ; print(f(True))?
False
True
None
// question 7 of 10
What is printed? def f(x): if x>0: return ""P"" else: return ""N"" ; print(f(-1))?
P
-1
N
// question 8 of 10
What is printed? def f(x,y): return x/y ; print(f(8,2))?
4.0
4
2
// question 9 of 10
What is printed? def f(x): return type(x) ; print(f(5))?
<class 'int'>
5
int
// question 10 of 10
What is printed? def f(a=1,b=2): return a+b ; print(f())?
3
Error
12
Submit Answers →