TANGRAM QUIZ
Ana Mellon
Created on August 22, 2023
More creations to inspire you
TRUE OR FALSE DISEASES
Personalized
BUCKETS SEL ACTIVITY
Personalized
FRACTIONS REVIEW MAZE
Personalized
ORDER OF OPERATIONS WITHOUT SOLUTIONS
Personalized
NEW ZEALAND
Personalized
HISTORY REVIEW TIMELINE
Personalized
PROYECTO CREDO
Personalized
Transcript
PythonQuiz
How much do you know about functions and procedures?
START
What is a function in Python?
A sequence of code that performs a specific task
Question 1
A loop structure
A way to define classes
A way to store data
Correct!
A function is a sequence of code that performs a specific task
NEXT
How do you define a function in Python?
Question 2
Using the `def` keyword
Using the `function` keyword
Using the `var` keyword
Using the `define` keyword
Correct!
'def' is the keyword to define functions and procedures
NEXT
Correct!
'def' is the keyword to define functions and procedures
NEXT
What are parameters in a function?
Question 3
Conditions for executing the function
Names of variables used in the function
The return values of the function
Numbers assigned to the function
Correct!
The function will return a value assigned to a variable
NEXT
What does the `return` statement do in a function?
Question 4
Defines a new variable
Terminates the function
Prints the output of the function
Sends a value back to the caller
Correct!
the value of the variable is returned for further use within the program
NEXT
How would you call a function named `calculate_area` with two arguments, `length` and `width`?
Question 5
`calculate_area(length, width)`
`calculate_area(width, length)`
`calculate_area(length = width)`
`calculate_area(width + length)`
Correct!
to avoid confusions always make sure the order of your arguments matches the order of your function parameters
NEXT
What's the purpose of using functions in programming?
Question 6
To add comments to the code
To make the code shorter
To make the code run faster
To organise and modularise code
Correct!
'Re-using code helps to reduce the scope for errors and makes it easier to maintain
NEXT
What does the `return` statement do in a function?
Question 4
Defines a new variable
Terminates the function
Prints the output of the function
Sends a value back to the caller
LEVEL COMPLETED!
START
¡ERROR!
Nope!
You have another chance
GO BACK