wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

EOT Revision Programming and Algorithms

Total questions: 30

Worksheet time: 16mins

Name
Class
Date
1.

What is the // used for in C sharp programming

a)

input

b)

output

c)

comment

d)

declaration

2.

In an algorithm how does one show the end of an IF statement

a)

full stop

b)

ENDIF

c)

semi colon

d)

stop

3.

Which of the following is used to store a number in a variable?

a)

Print

b)

INPUT

c)

IF

d)

End

4.

How many variable were declared in this program?

a)

1

b)

2

c)

3

d)

4

5.

What is the purpose of the statement in line 7?

a)

To prompt for his year of birth

b)

To store the birth year

c)

To make a decision

d)

To display age

6.

What is the best example of the output from line 10?

a)

age is 25

b)

25

c)

age = 2=5

d)

your age is 25

7.

What type of program is this?

a)

selection

b)

repetition

c)

sequence

d)

for loop

8.

Based on the declaration in lines 5 what type of data does "age" store?

a)

whole number

b)

decimal

c)

fraction

d)

positive

9.

What is the purpose of line 8?

a)

declaration of the variable birthyear

b)

storing a value in birthyear

c)

printing from birthyear

d)

prompting for birthyear

10.

Which line stores the result in the variable "age"?

a)

5

b)

8

c)

13

d)

15

11.

What is missing from line 8?

a)

then

b)

;

c)

<

d)

end

12.

In line 8, what does the symbol ">" mean?

a)

Less than

b)

greater than

c)

go right

d)

forward

13.

What would be printed if line 8 is false

a)

n

b)

n1

c)

false

d)

endif

14.

What type of flowchart is this?

a)

selection

b)

sequence

c)

repetition

d)

loop

15.

Which is the missing statement in this flowchart?

a)

write num2

b)

write num1

c)

if num1 > num2

d)

if num1 = num2

16.

Which statement is the same as input?

a)

Start

b)

Stop

c)

Print num1

d)

Read num1, num2

17.

Name two ways that algorithms can be done?

a)

videos and audio

b)

flowchart or pseudocode

c)

programs and code

18.

What is pseudocode?

a)

An algorithm represented using text

b)

A type of programming language

c)

A graphical representation of an algorithm

19.

What is a flowchart?

a)

An algorithm represented using text

b)

A type of programming language

c)

A graphical representation of an algorithm

20.

What is the symbol for a decision in a flowchart?

a)

A diamond

b)

A rectangle

c)

A parallelogram

d)

An oval

21.

Which of these is the correct symbol for a process in a flowchart?

a)

A diamond

b)

A rectangle

c)

A parallelogram

d)

An arrow

22.

How are symbols connected together in a flowchart?

a)

by arrow

b)

by words

c)

by numbers

d)

by diamonds

23.

Which symbol is used for an input or output in a flowchart?

a)

A parallelogram

b)

A diamond

c)

A circle

d)

oval

24.

Used to start and end a flowchart

a)

process

b)

decision

c)

terminator

d)

input

25.

When can algorithms be used?

a)

Only with computers and devices

b)

To design a solution to any problem

c)

For programming activities only

d)

Only for some internet activities

26.

What type of program is this?

a)

sequence

b)

selection

c)

repetition

d)

loop

27.

Which method, used in this program, changes the input to integer?

a)

ReadLine()

b)

WriteLine()

c)

ToInt32()

d)

Main()

28.

Which statement is used to display output?

a)

Console.ReadLine()

b)

Convert.ToInt32()

c)

Console.WriteLine()

d)

Convert.ToDouble()

29.

Which word means the same as " to find errors in your program and fix them"

a)

run

b)

compile

c)

declare

d)

debug

30.

If a programmer wants to declare a variable to store the name of a person, which of the following data types should he use?

a)

Integer

b)

Real

c)

Boolean

d)

String