WorksheetsPython L2- Quiz 2
Total questions: 7
Worksheet time: 4mins
Is the folowing code the proper way to define a function?
decl hello_function() =
print("hello")
Yes
No
Time.time() returns a very large decimal number representing the number of seconds since January 1st, 1970
True
False
Which of these is true about scope?
local is inside global which is inside built-in
built-in is inside local which is inside global
global is inside built-in which is inside local
python doesn't have scope
What is the output of this code block?
10 is out of bounds!
10 is good
out of bounds!
NameError: name 'outOfBounds' is not defined
What do parameters do?
pass values into a function
return one value from the end of a function
store the name of the function
They are the guidelines you follow to make a function
What are the benefits of a function? check all that are true.
They allow you to reuse your code
They are cleaner and easier to read
they are easy to change and update
They can be used before they are declared
True or False:
A module is a collection of libraries
True
False
