Quiz on Modularity and Functions

Quiz on Modularity and Functions

University

20 Qs

quiz-placeholder

Similar activities

Quiz-1-Set-1-OOPs-CPP

Quiz-1-Set-1-OOPs-CPP

University

20 Qs

Python for loop/lists

Python for loop/lists

9th Grade - University

15 Qs

Data Science Quiz1

Data Science Quiz1

University

20 Qs

Pemrograman Blokly

Pemrograman Blokly

9th Grade - University

20 Qs

Quiz sobre el ornitorrinco y la programación

Quiz sobre el ornitorrinco y la programación

8th Grade - University

15 Qs

Soal Web Pentest (2)

Soal Web Pentest (2)

University

20 Qs

Mock-Up Academy Programming Online Test

Mock-Up Academy Programming Online Test

6th Grade - University

20 Qs

Pretest Alpro Dasar

Pretest Alpro Dasar

University

20 Qs

Quiz on Modularity and Functions

Quiz on Modularity and Functions

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

Abhishek Swami

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is one main advantage of modular programming?

Increases execution time

Reduces the number of functions

Avoids use of loops

Makes code reusable and easier to debug

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a disadvantage of modularity?

Difficult to maintain

Slows down debugging

Increased memory overhead due to function calls

Code readability decreases

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

Hello

HelloHello

Hello\nHello

Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, a variable declared inside a function is:

Always global

Local by default

Static

None of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

10 10

5 10

5 5

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to access a global variable inside a function?

local

nonlocal

global

var

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

10

20

Error

0

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?