Function in Python

Function in Python

University

45 Qs

quiz-placeholder

Similar activities

Sec-C Quiz-2

Sec-C Quiz-2

University

50 Qs

3rd Year August Quiz

3rd Year August Quiz

University

40 Qs

DFH Class XII

DFH Class XII

12th Grade - Professional Development

46 Qs

Quiz on Programming Basics

Quiz on Programming Basics

3rd Grade - University

43 Qs

Web Programming (Midterm)

Web Programming (Midterm)

University

40 Qs

Python MCQ Question Sheet

Python MCQ Question Sheet

University

50 Qs

Exploring Python Fundamentals

Exploring Python Fundamentals

University

42 Qs

NMCNTT

NMCNTT

University

40 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?