
A Level Programming Concepts
Authored by Mr Applewhaite
Computers
12th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following pseudocode snippets correctly calculates the total of all even numbers within a range entered by the user?
low = input ("Enter the first number in the range") high = input ("Enter the last number in the range") total = 0 for n = low to high -1 if n MOD 2 == 0 then total = total + n endif next n print("Total of even numbers in the range ",total)
low = input ("Enter the first number in the range") high = input ("Enter the last number in the range") total = 0 for n = low to high if n MOD 2 == 1 then total = total + n endif next n print("Total of even numbers in the range ",total)
low = input ("Enter the first number in the range") high = input ("Enter the last number in the range") total = 0 for n = low to high -1 if n MOD 2 == 1 then total = total + n endif next n print("Total of even numbers in the range ",total)
low = input ("Enter the first number in the range") high = input ("Enter the last number in the range") total = 0 for n = low to high if n MOD 2 == 0 then total = total + n endif next n print("Total of even numbers in the range ",total)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a way to make programs easy to understand and maintain?
Meaningful variable names
Comments to explain sections of the program
Modular structure
Using complex and obscure variable names
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the subroutine answerYorN if the user inputs "y"?
"Please enter y or n: "
"You must answer y or n"
"y"
"n"
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the subroutine answerYorN do if the user inputs an invalid response?
It terminates the program.
It prints "You must answer y or n" and asks for input again.
It returns the invalid response.
It skips the input and continues.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the subroutine answerYorN?
To calculate the average temperature.
To validate user input as either "y" or "n".
To find the highest temperature.
To complete the trace table.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the difference between passing parameters by value and by reference.
By value: The value is copied into a variable in the subroutine; By reference: The address is passed to the subroutine.
By value: The address is passed to the subroutine; By reference: The value is copied into a variable in the subroutine.
By value: The value is copied into a variable in the subroutine; By reference: The value is copied into a variable in the subroutine.
By value: The address is passed to the subroutine; By reference: The address is copied into a variable in the subroutine.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is meant by modular programming?
Combining multiple programs into one large program.
Splitting a large program up into self-contained subroutines (modules).
Writing a program without using any subroutines.
Using only global variables in a program.
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
17 questions
Security and Ethics
Quiz
•
9th - 12th Grade
20 questions
Design your website
Quiz
•
7th - 12th Grade
16 questions
OCR Sys Arch J277
Quiz
•
10th - 12th Grade
20 questions
STS Informatika
Quiz
•
10th Grade - University
15 questions
Problem Solving : Design Solution
Quiz
•
12th Grade
17 questions
Algorytmy 8
Quiz
•
1st Grade - University
15 questions
Virtual Private Server
Quiz
•
12th Grade
15 questions
Control Panel Hosting
Quiz
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade