What is a function in Python?
CMU CS Academy Unit 2 Part 1 Functions

Flashcard
•
Mathematics
•
9th Grade
•
Hard
Quizizz Content
FREE Resource
Student preview

15 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
A function is a block of reusable code that performs a specific task and can be called when needed.
2.
FLASHCARD QUESTION
Front
What is the purpose of a return statement in a function?
Back
The return statement is used to exit a function and send a value back to the caller.
3.
FLASHCARD QUESTION
Front
What is a function's signature?
Back
A function's signature includes its name and the number and types of its parameters.
4.
FLASHCARD QUESTION
Front
What is the difference between a built-in function and a user-defined function?
Back
Built-in functions are provided by Python, while user-defined functions are created by the programmer.
5.
FLASHCARD QUESTION
Front
What does it mean to 'call' a function?
Back
To 'call' a function means to execute it by using its name followed by parentheses.
6.
FLASHCARD QUESTION
Front
What is a local variable?
Back
A local variable is a variable that is defined within a function and can only be accessed inside that function.
7.
FLASHCARD QUESTION
Front
What is a global variable?
Back
A global variable is a variable that is defined outside of any function and can be accessed from any function in the program.
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Writing Exponential Functions

Flashcard
•
9th Grade
14 questions
Evaluating Functions

Flashcard
•
9th Grade
14 questions
Multiplying Functions

Flashcard
•
9th Grade
15 questions
Parent Functions

Flashcard
•
9th Grade
15 questions
Parent Functions

Flashcard
•
9th Grade
10 questions
CMU CS Academy Unit 2 Part 3 Mouse Release Events

Flashcard
•
9th Grade
10 questions
CMU CS Academy Unit 2 Part 2: Functions W/ No or More Parameters

Flashcard
•
9th Grade
10 questions
Compare Quadratic Functions

Flashcard
•
9th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade