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
Functions - Python
Quiz
•
Computers
•
12th Grade
•
Hard
Pavani (CBSE)
Used 63+ 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()
31 questions
pyplot line and bar only
Quiz
•
12th Grade
41 questions
Gerbang Logika
Quiz
•
12th Grade
34 questions
Project STEM AP CS A Unit 1
Quiz
•
9th - 12th Grade
40 questions
Python Programming (non-OO) Final Review
Quiz
•
9th - 12th Grade
34 questions
1.4.3. Boolean Algebra
Quiz
•
12th Grade
33 questions
General Programming Terms
Quiz
•
10th - 12th Grade
40 questions
Python Revision Years 8&9 IGCSE
Quiz
•
9th - 12th Grade
40 questions
Robotics Final Study Guide
Quiz
•
9th - 12th Grade
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
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University