
Nat 5 Standard Algorithms + Predefined Functions
Authored by Chris Meechan
Computers
8th - 10th Grade
Used 7+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
You are a writing a program to add up the total cost of all the items in a shopping cart. State the standard algorithm you should use?
Running Total
Traversing an array
Input Validation
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Identify which code below correctly defines an array of strings with a length of 15
array = [15]
array = [" "]
array = [" "] * 15
array = [" "] * 14
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
State which standard algorithm would you use if you had to get test scores from an array to check which grade they should receive.
Running Total
Input Validation
Traversing an array
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Given that you have to be 18 or over to enter a club, identify the conditional loop that would be in the input validation algorithm.
For counter in range (0, 18)
while age >=18
while age > 18
while age < 18
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
State which of the following pseudocode defines the standard algorithm for input validation?
Get input, loop while the input is unacceptable, get user to reenter
Get input, check if valid
Get input, loop while the input is unacceptable, display error message, get user to reenter
Loop while the input is unacceptable, get user to reenter
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
You want to use a running total algorithm to find out the total miles ran each day in a month. State the type of loop you would use.
Fixed Loop
Conditional Loop
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Below is the code for a running total using an array complete the code:
array = [5, 4, 3, 2, 1]
total = 0
for counter in range (0, len(array)):
number = ?
total = number + total
array
array[0]
array[counter]
array [ 5, 4, 3, 2, 1]
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?