A Level Programming Concepts

A Level Programming Concepts

12th Grade

20 Qs

quiz-placeholder

Similar activities

¿CONOZCO MI ESCUELA? Quiz

¿CONOZCO MI ESCUELA? Quiz

12th Grade

20 Qs

Spreadsheet Formulas

Spreadsheet Formulas

8th - 12th Grade

20 Qs

CS1 Midterm Review 2

CS1 Midterm Review 2

9th - 12th Grade

21 Qs

ÔN TẬP TIN HỌC LỚP 3 (BÀI 8)

ÔN TẬP TIN HỌC LỚP 3 (BÀI 8)

12th Grade

17 Qs

AP CSP Unit 10 Algorithms

AP CSP Unit 10 Algorithms

12th Grade

15 Qs

AP CSP Unit 5 Review: Lists, Loops and Traversals

AP CSP Unit 5 Review: Lists, Loops and Traversals

9th - 12th Grade

19 Qs

Chapter 8 - Programming (IGCSE Computer Science)

Chapter 8 - Programming (IGCSE Computer Science)

9th - 12th Grade

15 Qs

Comp 1 - Skeleton Program

Comp 1 - Skeleton Program

12th Grade

20 Qs

A Level Programming Concepts

A Level Programming Concepts

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Mr Applewhaite

Used 2+ times

FREE Resource

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

Media Image

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

Media Image

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

Media Image

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.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?