
Functions & procedures
Quiz
•
Computers
•
10th - 12th Grade
•
Practice Problem
•
Hard
Louise Lockwood
Used 57+ times
FREE Resource
Enhance your content in a minute
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an advantage of using local variables?
They allow the variable to be used throughout the whole program
They allow variable identifiers to be reused each time
They are easier to program than global variables
A wider range of data types can be used
Answer explanation
Local variables allow variable identifiers to be reused each time, making them an advantage over global variables.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What term is used to describe data passed into/out of a program?
Variable
Loop
Constant
Parameter
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Leo wants to create a subroutine that will roll a dice. Which syntax is correct?
def dice roll ():
def diceroll ()
def diceroll ():
def diceroll []:
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What would the output be from the program shown here? (assuming that the user enters "John" and "Smith"
John
Smith
John Smith
Error
Answer explanation
The correct answer is 'Error' because the program does not concatenate the input strings 'John' and 'Smith', resulting in an error.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a procedure?
A small section of code within a program which performs a task
Code which produces a calculated result
Answer explanation
A procedure is a small section of code within a program that performs a task, making it the correct choice.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If a variable has "global scope" it can be
used anywhere in the program
only used outside of a function
only used inside of a function
used outside of the program
Answer explanation
If a variable has 'global scope', it can be used anywhere in the program, not restricted to a specific function or part of the code.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If a variable has "local scope" it is available for use outside of its function.
TRUE
FALSE
Answer explanation
FALSE - If a variable has 'local scope', it is only available for use within its function and not outside of it.
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
15 questions
Cyber Security KS4
Quiz
•
8th - 12th Grade
10 questions
Soal Ujian Komputer
Quiz
•
10th - 12th Grade
15 questions
Excel
Quiz
•
10th - 12th Grade
14 questions
Pre-test: On Online searching by Innovative Teaching Ideas)
Quiz
•
6th - 12th Grade
18 questions
12AIT - All About W3C <3
Quiz
•
10th Grade - University
15 questions
MVC-PHP
Quiz
•
12th Grade
16 questions
Základní části počítače a ergonomie
Quiz
•
9th - 10th Grade
10 questions
Pemahaman Dasar Firewall
Quiz
•
12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
