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
10 questions
Introduction to Python

Flashcard
•
8th Grade
15 questions
Parent Functions

Flashcard
•
9th Grade
15 questions
Operations & Compositions & Inverses

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
15 questions
Writing Exponential Functions

Flashcard
•
9th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Mathematics
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University
20 questions
Solving Linear Equations for y

Quiz
•
9th - 12th Grade
11 questions
Graph Match

Quiz
•
9th - 12th Grade
16 questions
Function or Non-Function?

Quiz
•
8th - 10th Grade
15 questions
Exponent Properties

Quiz
•
7th - 9th Grade
36 questions
WMS Pre-algebra Final Review

Quiz
•
8th - 9th Grade