WorksheetsEOS revision Quiz
Total questions: 66
Worksheet time: 33mins
What is an algorithm?
A step-by-step set of instructions to solve a problem
A picture of computer hardware
A single command that runs automatically
A database of saved user inputs
In a flowchart, what does the circle/oval shape represent?
Start/End
Process
Input/Output
Decision
In a flowchart, what does the rectangle represent?
Process
Start/End
Decision
Connector
In a flowchart, what does the parallelogram represent?
Input/Output
Decision
Start/End
Process
In a flowchart, what does the diamond represent?
Decision
Process
Start/End
Input/Output
In a flowchart, what does the double-lined rectangle represent?
Predefined process/subroutine
Start/End
Connector
Input/Output
Which is the only flowchart shape that has two arrows coming out of it?
Diamond (decision)
Rectangle (process)
Parallelogram (input/output)
Oval (start/end)
Identify the best set of corrections for the shown flowchart (with Start, a = 5, and an output).
Use an oval for Start, use a parallelogram for Output, ensure arrows point top-to-bottom
Keep Start as a rectangle, change Output to a diamond, add three outgoing arrows
Remove Start, use a rectangle for Output, reverse all arrows upward
Use a circle for Output, add labels Yes/No to all arrows, remove the assignment
For the code sequence that asks two numbers, computes average, and prints it, which expression correctly computes the average?
(weight1 + weight2) / 2
weight1 - weight2
2 * (weight1 + weight2)
(weight1 + weight2) * 2
For the code that asks two numbers, computes average, and prints it, which flowchart step immediately follows reading the second number?
Calculate the average using (weight1 + weight2) / 2
Display the final message
Go back to Start
Stop the algorithm
In the shown flowchart, choose the best set of corrections based on arrows, shapes, and labelling after an IF decision.
Use a diamond for the IF test, label outgoing arrows Yes/No, and point arrows to the correct next steps
Replace the IF diamond with a rectangle, remove labels, and add three outputs
Add a second Start symbol after the IF, remove all arrowheads, and use circles for processes
Use a parallelogram for decisions, keep arrows unlabeled, and connect both paths to Stop directly
Given the algorithm that asks for two test scores, adds them, and displays 'Welldone' if the total is over 100, what is displayed when the total equals 95?
Better luck next time
Welldone
Error
Try again
What do logic gates do in computers?
They perform logical operations on inputs to produce a single output
They store files permanently
They display graphics on the screen
They measure internet speed
In Boolean logic, which number represents True/Yes?
1
0
2
-1
In Boolean logic, which number represents False/No?
0
1
2
-1
How many inputs does a basic AND gate have?
Two
One
Three
Four
How many outputs do standard logic gates have?
One
Two
Three
It varies each time
For an AND gate, what is the output when the inputs are 1 and 0?
0
1
Undefined
2
For an OR gate, what is the output when the inputs are 0 and 0?
0
1
Undefined
2
For a NOT gate, what is the output when the input is 1?
0
1
Undefined
2
What do you call it when code or an algorithm has more than one potential path?
Selection (branching/decision)
Iteration (looping)
Compilation
Rendering
What is a condition in programming or flowcharts?
A test that evaluates to True or False to decide which path to follow
A list of program steps to run in order
A way to store text in memory
A screen message shown at the end
For the condition if colour == "green": print("GO") else: print("Wait"), what is printed when colour is "green"?
GO
Wait
Error
Stop
For the algorithm shown in the hand-drawn flowchart with a = 10 and b = 25, which message is displayed when it runs?
"Sigma"
"Skibid"
"Gyatt"
"Hello"
What is a subroutine?
A named set of instructions that can be run when called
A type of computer memory
A hardware switch inside the CPU
A file that stores user data
A subroutine called Hello should do which of the following?
Display "Hi"
Display "Bye"
Ask for a number
Stop the program immediately
For the algorithm that asks for the user's name, stores it in friend, runs subroutine Hello, and then displays "I like x" using friend, which final message is correct when the user types Alex?
I like Alex
Hello Alex
Bye Alex
Welcome, Alex
In the shown flowchart with repeated calls to printDouble and a hint about when the algorithm should end/stop, which correction fixes the mistake?
Call printDouble once, then output the doubled number and Stop
Remove Stop entirely and keep calling printDouble forever
Add a second Start after the first printDouble
Replace printDouble with a decision diamond labelled Yes/No
What is a comparison?
A calculation that changes a number into a different base
A check between two values that returns true or false
A command that repeats a block of code a fixed number of times
A way to store text inside a variable
How do each of these operators work: <, >, <=, >=, ==, !=
They compare two values and produce a Boolean result
They assign new values to variables
They convert numbers into strings automatically
They read input from the keyboard
What is the comparison operator for greater than or equal to
>
>=
<=
==
What is the comparison operator for less than or equal to
<=
>=
!=
<
What is the comparison operator for not equal to
==
!=
<
>
What is the comparison operator for equal to
=
==
>
<=
In programming, why do we not use one equal sign for checking if two things are equal to each other
Because a single equals sign is used for assignment, not comparison
Because one equals sign compares strings only
Because one equals sign works only inside loops
Because one equals sign is reserved for comments
What is an integer? Give two examples.
A whole number with no decimal part, for example 3 and −12
A number with a decimal point, for example 3.5 and 0.1
A piece of text, for example "cat" and "Hello"
A truth value, for example true and false
What is a real (or float)? Give two examples.
A whole number, for example 7 and 0
A decimal number, for example 2.75 and −0.5
A single character, for example "a" and "Z"
A list of values, for example [1,2,3]
What is a string? Give two examples.
A sequence of characters, for example "book" and "123"
A decimal number, for example 4.2 and −1.0
A whole number, for example 9 and −3
A Boolean value, for example true and false
What symbols do we always put around a string
Parentheses ( )
Square brackets [ ]
Quotation marks " "
Curly braces { }
Fill in the gaps below, to convert the input into an integer: age = ___ input("Type your age") ___
age = int(input("Type your age"))
age = input(int "Type your age")
age = int"Type your age"(input)
age = input("Type your age")
Write a program that asks the user to type their weight, converts what they type into a real (a float), and saves it to a variable called weight.
weight = float(input("Type your weight"))
weight = input("Type your weight")
print(float(weight))
weight = int(input("Type your weight"))
What is an input in programming
Data a program sends to the screen
Data a program receives from a user or another source
The name of a variable
The process of repeating code
What is an output
Data a program stores in memory
Data a program sends to the user or another system
Data typed by the user
A comment in the code
How can you create a simple program that takes input and provides output
Use input to read a value and print to display it, for example: name = input("Your name?"); print(name)
Write only print statements
Write only input statements
Store a value in a variable without printing or reading anything
What is a variable
A fixed value that cannot change
A named storage location that can hold a value
A comment used to explain code
A special symbol used only for math
What symbol is used to create a variable in a program
The plus sign +
Parentheses ( )
The equals sign = for assignment
The hash symbol #
Can you write code where you save a string "JC" to a variable called teacher
teacher = "JC"
teacher == "JC"
"JC" = teacher
print(teacher = "JC")
How does each operator work: +, -, *, /
They perform addition, subtraction, multiplication, and division respectively
They compare values for equality and inequality
They create and delete variables
They read and write files
In Python, how do you display the variable m multiplied by 2
print(m * 2)
print(m ** 2)
print(m + 2)
print(2 / m)
In Python, how do you display the variable n divided by 3
print(n / 3)
print(n * 3)
print(3 - n)
print(n // 3)
We need to test code to check it works. Why do we need to plan how we test the code?
To know the inputs and expected outputs so tests are thorough and consistent
To avoid writing comments in the program
To make the code run faster without checking results
To skip running the program entirely
In a test plan, what is the expected outcome?
The result you predict the program should produce for a given input
The number of times you will run the program
The list of variables used in the program
The error messages the program prints during testing
Complete the test plan for the code: num1 = int(input("Type the first number")) num2 = int(input("Type the second number")) total = num1 + num2 print("The sum is", total). For Test ID 1 with data entered num1 = 20 and num2 = 15, what is the expected outcome?
total = 35
total = 30
total = 25
total = 20
Complete the test plan for the code: num1 = int(input("Type the first number")) num2 = int(input("Type the second number")) total = num1 + num2 print("The sum is", total). For Test ID 2 with data entered num1 = 19 and num2 = 34, what is the expected outcome?
total = 53
total = 45
total = 34
total = 19
Complete the test plan for the code: num1 = int(input("Type the first number")) num2 = int(input("Type the second number")) total = num1 + num2 print("The sum is", total). For Test ID 3 with data entered num1 = 7 and num2 = 9, what is the expected outcome?
total = 16
total = 14
total = 9
total = 7
Complete the test plan for the code: num1 = int(input("Type the first number")) num2 = int(input("Type the second number")) total = num1 + num2 print("The sum is", total). For Test ID 4 with data entered num1 = 12 and num2 = 12, what is the expected outcome?
total = 24
total = 12
total = 20
total = 30
What does it mean if you debug a program?
You find and fix errors in the code
You add more features without testing
You rewrite the program from scratch
You remove all comments from the code
Can you find 4 errors in the code below, and write the code correctly? Code shown: print("What is 1 plus 100?) print(1*100) print("What is 56 divided by 7, plus 23?" print(56-7+23). Which corrections are needed?
Close the opening quote in the first print statement
Use 1 + 100 instead of 1 * 100
Add the missing closing parenthesis in the third print statement
Compute 56 / 7 + 23 instead of 56 - 7 + 23
Can you find 5 errors in the code below, and write the code correctly? Code shown: discount = 15 costPerCup = float(input("Enter the cost of each cup: ") numberBought = input("Enter the number of cups bought: ") total Cost = (costPerCup + numberBought) - discount print("The total cost is" totalCost). Which corrections are needed?
Add the missing closing parenthesis to the costPerCup input line
Convert numberBought to an integer
Change total Cost to totalCost (no space)
Use costPerCup * numberBought instead of costPerCup + numberBought
Add a comma after the message in print and ensure totalCost is defined
What is a pattern?
A repeated or predictable arrangement that can be recognized
A single random event that cannot be repeated
A comment added to explain code
A list of test cases for a program
Why is pattern recognition useful when solving problems?
It helps identify repeated structures to predict outcomes and choose efficient strategies
It makes problems longer to solve by adding extra steps
It only works for artistic designs, not algorithms
It avoids testing by guessing answers
What is a prototype?
A preliminary model used to test ideas and gather feedback
The final, fully released software product
A list of reported bugs in the software
A programming language used to write the software
What does user feedback mean?
Opinions and responses from users about the product
Automatic updates installed by the system
Internal notes written by developers
Data backups saved after release
What are two different types of prototypes that are used in software development?
Low-fidelity prototypes such as paper sketches or simple mockups
High-fidelity interactive digital prototypes
Production releases used by all customers
Data backups stored for disaster recovery
What are the two most important reasons we create project plans?
To organize tasks and timelines so the work stays on track
To clarify the project’s scope and requirements before building
To slow down development so fewer features are added
To hide the true costs of the project from stakeholders
Can you give 3 examples of information that should be in a project plan?
Project goals and requirements
Timeline with milestones
Team roles and responsibilities
Favorite snacks for meetings
