function in python

Quiz
•
Computers
•
12th Grade
•
Hard
Puneet Kohli
Used 78+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default return value for a function that does not return a value explicitly?
None
int
double
null
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following items are present in the function header?
Function name only
Both function name and parameter list
parameter list only
Return value
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following keywords marks the begining of the function block?
Func
define
def
function
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the name given to that area of memory, where the system stores the parameters and local variables of a function call?
a heap
storage area
a stack
an array
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What Is The Output Of The Following Code Snippet?
def func(message, num = 1):
print(message * num)
func('Welcome')
func('Viewers', 3)
Welcome
Viewers
Welcome
ViewersViewersViewers
Welcome
Viewers,Viewers,Viewers
Welcome
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What Is The Output Of The Following Code Snippet?
def func(message, num = 1):
print(message * num)
func('Welcome')
func('Viewers', 3)
Welcome
Viewers
Welcome
ViewersViewersViewers
Welcome
Viewers,Viewers,Viewers
Welcome
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Fill in the line of code for calculating the factorial of a number.
def fact(num):
if num == 0:
return 1
else:
return _____________________
num*fact(num-1)
(num-1)*(num-2)
num*(num-1)
fact(num)*fact(num-1)
Create a free account and access millions of resources
Similar Resources on Wayground
18 questions
SIS_Computer Science

Quiz
•
10th Grade - University
17 questions
CMU Unit 2 Practice Test

Quiz
•
10th - 12th Grade
19 questions
Parameters and Return Review

Quiz
•
9th - 12th Grade
15 questions
JavaScript and Graphics

Quiz
•
9th - 12th Grade
24 questions
Java Loops

Quiz
•
10th - 12th Grade
15 questions
Functions and Parameters Quiz

Quiz
•
9th - 12th Grade
16 questions
DATA SCIENCE Assessment (April)

Quiz
•
8th - 12th Grade
15 questions
CP M4 Repetition & Loops

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Computers
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
20 questions
Lab Safety and Lab Equipment

Quiz
•
9th - 12th Grade
7 questions
EAHS PBIS Lesson- Bathroom

Lesson
•
9th - 12th Grade
57 questions
How well do YOU know Neuwirth?

Quiz
•
9th - 12th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
6 questions
Secondary Safety Quiz

Lesson
•
9th - 12th Grade
4 questions
Study Skills

Lesson
•
5th - 12th Grade
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University