Functions - Python

Quiz
•
Computers
•
12th Grade
•
Hard
Pavani (CBSE)
Used 68+ times
FREE Resource
36 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
1. A function has the following definition:
def function1(x=4,y=3,z=2):
.........print(x,y,z)
Write the function call such that x, y and z get default values
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output
stop
slow
go
slow
None
go
3.
FILL IN THE BLANK QUESTION
45 sec • 1 pt
Predict the output.
Note: end=' ' is a single space.
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following items are present in the function header?
function name
parameter list
return value
All of the options
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following function headers is correct?
def fun(a = 2, b = 3, c)
def fun(a = 2, b, c = 3)
def fun(a, b = 2, c = 3)
def fun(a, b, c = 3, d)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In which part of memory does the system stores the parameter and local variables of function call?
heap
stack
Uninitialized data segment
None of these
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which one of the following is the correct way of calling a function?
function_name()
call function_name()
ret function_name()
def function_name()
Create a free account and access millions of resources
Similar Resources on Wayground
34 questions
Computer Science I Midterm Review (AKHS)

Quiz
•
9th - 12th Grade
34 questions
CB30: Unit 2 Test Review

Quiz
•
9th - 12th Grade
40 questions
10th Grade 10 - IT Programming - 2nd Cycle Exam

Quiz
•
10th Grade - University
31 questions
Basic Robotics - CH09: Programming and file management

Quiz
•
9th - 12th Grade
40 questions
4-12 & 4-13 PLC Classwork

Quiz
•
9th - 12th Grade
41 questions
IB Computer Science A1.1 ,B1.1,B2.1,B2.1.1,B2.1.2

Quiz
•
12th Grade
33 questions
Kuis Inf

Quiz
•
9th - 12th Grade
40 questions
Scratch Graduation

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade