Function definitions in Python start with what keyword?
Python Testing

Quiz
•
Computers
•
9th - 12th Grade
•
Hard

Samuel Markham
Used 10+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
def
fun
function
define
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A function parameter is a kind of variable accessible...
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which two statements are true?
The return keyword forces a function to restart its execution
The return keyword may cause the function to return a value
The return keyword forces the function's execution to terminate
The return keyword can only appear once inside a function
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following Python code?
tup = (1, ) + (1, )
tup = tup + tup
print(len(tup))
2
4
0
the snippet causes an error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code if the user enters "kangaroo" as their first prompt and 0 as their second?
Error.Error.Error
4.0
Do not divide by Zero!
Wrong value.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the expected behaviour of the following snippet if the user enters 0?
value = input("Enter a value: ")
print(10 / value)
The program will raise a ValueError exception
The program will raise the ZeroDivisionError exception
The program will raise the TypeError exception
The program will output 0 to the console
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following Python code?
list = [1, 2, 3, 4]
print(list[4])
4
1
the snippet causes an IndexError
None
Create a free account and access millions of resources
Similar Resources on Quizizz
14 questions
PYTHON DICTIONARIES

Quiz
•
11th Grade
10 questions
Java Exceptions

Quiz
•
10th Grade
14 questions
GCSE Computing - Subprograms

Quiz
•
9th - 10th Grade
15 questions
Selection in Python

Quiz
•
1st - 9th Grade
15 questions
PCEP Section 4C: Python Built-In Exceptions Hierarchy

Quiz
•
12th Grade
15 questions
Java Script Quiz

Quiz
•
9th - 12th Grade
11 questions
Python IF ELSE

Quiz
•
10th Grade
13 questions
Y9 Homework 1: Python Revisited 1

Quiz
•
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
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Identify Slope and y-intercept (from equation)

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

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
27 questions
STAAR English 1 Review

Quiz
•
9th Grade