Feel free to use or edit a copy
includes Teacher and Student dashboards
Measures 1 skill from
Measures 1 skill from
Track each student's skills and progress in your Mastery dashboards
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
10 questions
Show answers
- Q1What is meant by subroutine?A subroutine is a section of code within a large program that will perform a single taskIt's a storage location in memoryLooping a section of code until a condition is trueA subroutine is a section of code within a large program that will perform multiple tasks45s3.2.10
- Q2What is an advantage of using subroutines?Subroutines makes it more difficult to track the program flowSaves the programmers time because code can be re-written easilySaves the programmers time because code can be reused as it's been written and testedCheck whether a condition is true45s3.2.10
- Q3Why would you want to use local variables?They're easier to see that the value has not changedSaves the programmers time because code can be reused as it's been written and testedThey're easier to track the changesLocal variables are better because you can change the value in any part of the program45s3.2.10
- Q4How do you start a subroutine in pseudocode?SUBROUTINE name (parameters) ENDSUBROUTINESUBROUTINE name (parameters) SUBROUTINESUBROUTINESUB END45s3.2.10
- Q5What is the purpose of this subroutine?To add the meal and drinks together to work out the total costThis is not an example of a subroutineTo add the meal together to work out the total costIt's a calculator45s3.2.10
- Q6What is the purpose of parameters?They pass through variables from the subroutine to the main programParameters do not return a value back to the main programThey pass through variables from the main program to the subroutineIt's job is it return a value back to the main program45s3.2.10
- Q7Here is an example of a subroutine. How do you call the subroutine and output it to the screen?RETURN numberOUTPUT remainder()remainder()OUTPUT number45s3.2.10
- Q8Which of these creates a subroutine called levelUp that will increase the score by 10 and level by 1? The correct subroutine must pass the score and level through as parameters.levelUp() level = level + 1 score = score + 10 ENDSUBROUTINESUBROUTINE levelUp(score, level) level = level + 1 score = score + 10 ENDSUBROUTINESUBROUTINE levelUp() level = level + 1 score = score + 10 ENDSUBROUTINESUBROUTINE levelUp(score, level) level = level + 1120s3.2.10
- Q9What code will declare a new local variable called number with a value of 5 in this subroutine?number <-- 5numberGenerator(number)(number)RETURN number60s3.2.10
- Q10What is the difference between a function and procedure?A function passes through variables from the main program to the subprogram, whereas a procedure does notA procedure passes through variables from the main program to the subprogram, whereas a function does notA function returns a value back to the main program whereas procedure does notA procedure returns a value back to the main program whereas procedure does not60s3.2.10
