
Quiz on Modularity and Functions

Quiz
•
Information Technology (IT)
•
University
•
Hard
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
Similar Resources on Wayground
20 questions
2F-1 | Python Quiz | 14/10/2024

Quiz
•
University
15 questions
Quiz 1: Introduction to Data Structures and Algorithms

Quiz
•
University
25 questions
PPL (Quiz 5) Procedures and Functions

Quiz
•
University
15 questions
Java_MCQ_3

Quiz
•
University
20 questions
DSA (QUIZ 6) Hashing, Graphs, Advanced Graph Algorithms, and DP

Quiz
•
University
20 questions
quiz1B1

Quiz
•
7th Grade - University
15 questions
CMDP2063 Unix and C Programming

Quiz
•
University
23 questions
C++ Functions Quiz

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade