What is the output of the following function call
def fun1(name, age=20):
print(name, age)
fun1('X', 25)
4/9/2024 - Python functions
Quiz
•
Professional Development
•
Professional Development
•
Hard
Dr.S.Vidhya KGCAS
Used 4+ times
FREE Resource
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following function call
def fun1(name, age=20):
print(name, age)
fun1('X', 25)
X 25
X 20
Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Python function always returns a value
True
False
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
It indicates the start of a loop
It defines a new variable
It defines a new function
It imports a module
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A value that is optional when calling the function
The first value passed to the function
A constant value in a function
A value that is used if no argument is provided
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
def sum(a, b=2):
return a + b
print(sum(3))
Error
3
2
5
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
def multiply(x, y=1):
return x * y
The function requires two arguments
The function will only multiply x
y is an optional parameter with a default value of 1
The function will not work without specifying y
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Functions already defined in python is
User defined function
Built-in functions
Library functions
Both b and c
10 questions
Valores booleanos, Ejecución Condicional: Cómo tomar decisiones
Quiz
•
Professional Development
10 questions
Power BI week 6
Quiz
•
Professional Development
10 questions
Basics of R Programming-I
Quiz
•
12th Grade - Professi...
10 questions
Day-4 IOAC - ML Python Assessment_12th-Feb-2023
Quiz
•
Professional Development
10 questions
Introduction to TRIZ (Eng)
Quiz
•
Professional Development
10 questions
Conseillers DEF Quizz
Quiz
•
Professional Development
11 questions
first order system response
Quiz
•
Professional Development
10 questions
Introducción al lenguaje Python
Quiz
•
Professional Development
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