How do you identify the statements that belong to the body of a function?
Chapter 12 Exam Review

Quiz
•
Information Technology (IT)
•
8th Grade
•
Easy
Ashley Brown
Used 25+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Indent those statement the same amount underneath the function "def" statement
Add the "def" keyword to the beginning of each statement
Add opening and closing curly braces { and } to mark the start and stop of the function body
Add the same comment (#) to the right of each statement within the body
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What character should be placed at the end of the function "def" line, after the parentheses?
Hashtag (#)
Colon (:)
Exclamation (!)
Dash (-)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword marks a spot in a function where the program flow will go back to the calling code?
continue
jump
return
break
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If a function named "mystery" is defined as taking no parameters, how would you call that function from your code?
mystery
mystery()
# mystery
mystery[ ]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes where you should define your function in your code?
Near the top of the source file, before that function is called by any main program code
Near the bottom of the source file, after that function is called by any main program code
Always place functions in a separate source file
The location is not important, so place the function wherever you like
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the code below, which printed output will appear first when the code runs?
BOO
I'm not afraid of ghosts
Syntax error - haunted() is not a valid function name
Runtime exception - the haunted() function is called with incorrect parameters
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a Python rule for naming functions?
Function names must be less than 32 characters
Function names can contain letters, numbers and underscores
The first character in a function name cannot be a number
Function names are case-sensitive
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Unit 3: Kira Learning

Quiz
•
8th Grade
20 questions
Exploring the World of AI

Quiz
•
6th Grade - University
20 questions
Python Programming Quiz

Quiz
•
8th Grade
20 questions
G08- ICT Q1 Reviewer

Quiz
•
8th Grade
20 questions
Latihan Soal Bab 1 dan 2

Quiz
•
8th Grade
15 questions
Quiz sobre el ornitorrinco y la programación

Quiz
•
8th Grade - University
20 questions
Summative Assessment on Arduino Output Devices

Quiz
•
8th Grade
20 questions
quiz1B1

Quiz
•
7th Grade - University
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 Information Technology (IT)
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
17 questions
Parts of Speech

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

Quiz
•
KG - University
44 questions
El fin del año- 7th

Quiz
•
7th - 12th Grade
40 questions
Word Study Assessment: Roots, Prefixes, Suffixes, and Vocabulary

Quiz
•
8th Grade
17 questions
guess the logo

Quiz
•
8th Grade
16 questions
Function or Non-Function?

Quiz
•
8th - 10th Grade
15 questions
Sentence Fragments and Run-ons

Quiz
•
8th Grade