Function in Python

Function in Python

University

45 Qs

quiz-placeholder

Similar activities

Python Quiz Module1

Python Quiz Module1

University

40 Qs

Quiz1810

Quiz1810

University

45 Qs

Python Quiz

Python Quiz

University

45 Qs

Technical Quiz

Technical Quiz

University

40 Qs

Python PCAP 31-03

Python PCAP 31-03

University

50 Qs

Pre-Test Praktikum

Pre-Test Praktikum

University

50 Qs

Joy of Programming

Joy of Programming

University

50 Qs

Quiz Trivia

Quiz Trivia

University

50 Qs

Function in Python

Function in Python

Assessment

Quiz

Computers

University

Medium

Created by

Chaitrali Kardile

Used 6+ times

FREE Resource

45 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why are functions used in programming?
To make code reusable
To increase complexity
To reduce efficiency
To remove variables

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to define a function in Python?
def
function
define
func

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT an advantage of using functions?
Code reusability
Better organization
Faster execution always
Modularity

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which symbol is used for function parameters?
()
{}
[]
<>

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is a function called in Python?
By writing function_name()
By defining function again
By writing function_name
By using return

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the scope of a variable defined inside a function?
Local
Global
Static
Dynamic

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if a function accesses an undefined variable?
Error
Returns None
Creates the variable
Ignores the statement

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?