
PPL (Quiz 5) Procedures and Functions
Authored by M'Alou Gonzales
Information Technology (IT)
University
Used 14+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main difference between a function and a procedure?
Functions return a value, while procedures do not.
Procedures return a value, while functions do not.
Functions are only used in Python, while procedures exist in all languages.
There is no difference between functions and procedures.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In which of the following scenarios is a procedure more appropriate than a function?
Calculating the total price of a shopping cart.
Checking the balance of a bank account.
Transferring money between two accounts.
Converting Celsius to Fahrenheit.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct example of a function in Python?
def greet(): print("Hello")
def add(a, b): return a + b
def display(): pass
Both A and B
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is "pass by value" in parameter passing?
The function receives a copy of the variable.
The function modifies the original variable.
The function cannot accept parameters.
The function only works with integers.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is "pass by reference" in parameter passing?
The function gets a copy of the variable.
The function modifies the original variable.
The function creates a new variable.
The function only accepts strings.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which type of variable is only accessible inside the function where it is declared?
Global variable
Local variable
Static variable
Reference variable
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of this code? x = 5 def myFunc(): x = 10 print(x) myFunc() print(x)
10 10
5 5
10 5
Error
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
quiz1B1
Quiz
•
7th Grade - University
20 questions
Quiz sobre Estruturas de Árvores
Quiz
•
University
20 questions
SDLC Basics LEC 01 -SLT
Quiz
•
University
20 questions
HO - 11 Preguntas sobre CRUD y SQLite
Quiz
•
University
20 questions
Understanding Database Technologies, Relational Model, and Data
Quiz
•
University
20 questions
Eva_Est_P1_11_PMV
Quiz
•
4th Grade - University
20 questions
Digitalization and Development
Quiz
•
University
21 questions
Direct Data Entry Devices, Advantages and Disadvantages
Quiz
•
7th Grade - University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University