Appendix 5d (OCR A-Level Computer Science): Quizzes
📚Quizzes
Practise the questions
13 questions from this quiz
ShowHide
Practise the questions
13 questions from this quiz
Which keyword is used to make a variable accessible throughout the entire program?
Which keyword is used to make a variable accessible throughout the entire program?
global
What does str(3) return?
What does str(3) return?
"3"
What does int("3") return?
What does int("3") return?
3
How many times does 'for i = 0 to 7' execute the loop?
How many times does 'for i = 0 to 7' execute the loop?
8 times
When does a do-until loop check its condition?
When does a do-until loop check its condition?
After each iteration
Which symbol means 'not equal to'?
Which symbol means 'not equal to'?
!=
What is the result of 12 MOD 5?
What is the result of 12 MOD 5?
2
What is the result of 17 DIV 5?
What is the result of 17 DIV 5?
3
What is the result of 3 ^ 4?
What is the result of 3 ^ 4?
81
If someText = "Computer", what does someText.substring(3, 3) return?
If someText = "Computer", what does someText.substring(3, 3) return?
"put"
In an array declared as 'array names[5]', what is the index of the first element?
In an array declared as 'array names[5]', what is the index of the first element?
0
How do you declare a 2D array with 8 rows and 8 columns?
How do you declare a 2D array with 8 rows and 8 columns?
array board[8, 8]
Which method reads a line from an opened file?
Which method reads a line from an opened file?
readLine()
