PPL (Quiz 5) Procedures and Functions
Quiz
•
Information Technology (IT)
•
University
•
Easy
M'Alou Gonzales
Used 14+ times
FREE Resource
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
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
"Mahal kong NVSU" Quiz Bee
Quiz
•
University
20 questions
Introducción a la Ciberseguridad
Quiz
•
University
20 questions
F10E Chapter 7: Information Systems and Management Quiz
Quiz
•
University
22 questions
Internet and App script
Quiz
•
5th Grade - University
20 questions
LogoNOVA (FYIT Logo Quiz)
Quiz
•
University
20 questions
Pengantar Teknologi Informasi
Quiz
•
University
20 questions
Quiz desarrollo app moviles
Quiz
•
University
20 questions
8NGS_P
Quiz
•
8th Grade - University
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Information Technology (IT)
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
12 questions
Halloween
Quiz
•
3rd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
14 questions
Eat Healthy,Be Healty
Quiz
•
4th Grade - University
7 questions
History of Halloween: Pagan or Christian?
Interactive video
•
11th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
