Python Quiz on functions

Quiz
•
Computers
•
6th - 8th Grade
•
Medium
Ridhaan Mishra
Used 3+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a function?
piece of code.
a type of variable.
a block of code which runs when it is called.
a block of code which runs automatically when we test our code.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following function?
14
1
4
1,2
Error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a function?
def function():
print('hi')
def function()
print('hi')
make function():
print('hi')
define function():
print('hi')
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the function?
Hello World!
Bye!
Hello World!
Hello World!
Bye!
Bye!
Hello World! Bye!
Hello World!
Hello World! Bye!
Hello World! Bye!
5.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
___ function():
Fill in the blank.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output?
a triangle
fd(120)
rt(120)
Nothing
Error
7.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
Rewrite this line of code correctly.
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of following code snippet:
10
24
7
1
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a recursive function?
A function that calls other function.
A function which calls itself.
Both A and B
None of the above
Similar Resources on Wayground
10 questions
Python - Printing, Variables and Syntax

Quiz
•
8th Grade
13 questions
Program Development - Python: Errors

Quiz
•
8th - 10th Grade
10 questions
Python Programming

Quiz
•
7th - 9th Grade
12 questions
Python Fundamentals

Quiz
•
8th Grade
12 questions
Python

Quiz
•
7th - 8th Grade
10 questions
Python Basics

Quiz
•
8th - 10th Grade
10 questions
Python Variables

Quiz
•
6th Grade
11 questions
Python Basics Quiz

Quiz
•
8th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
Discover more resources for Computers
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
13 questions
Primary and Secondary Sources

Quiz
•
6th Grade
15 questions
Decimal Operations

Quiz
•
6th Grade
10 questions
Plotting Points on the Coordinate Plane

Quiz
•
7th - 8th Grade