wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Science Principals Final

Total questions: 102

Worksheet time: 2hrs 35mins

Name
Class
Date
1.

a variable type in python

a)

boolean

b)

integer

c)

string

d)

float

e)

if statement

2.

the function that converts a variable to a string

a)

str()

b)

int()

c)

float()

d)

string magician

3.

the variable type that has only 2 options: True or False

a)

string

b)

boolean

c)

int

d)

float

4.

the name for combining two or more strings

a)

concatenation

b)

joining

c)

combining

d)

slicing

5.

What happens if there is no else statement after an if statement?

a)

The program will execute the else statement anyway

b)


The program will move on to the next line of code outside of the if statement.

c)

The program will crash

d)

The if statement will be ignored

6.

Which kind of loop would be used?


I need a program that will keep letting me add a monthly payment for 12 months.

a)

FOR Loop

b)

WHILE Loop

7.

What is a nested loop?

a)

when you utilize birds and nests

b)

when one loop is put inside another loop

c)

letting your computer calculate everything through a nest

d)

i have no clue

8.

What is loop iteration?

a)

I have no clue..

b)

when things keep going over and over and over

c)

meaning repeating steps (or instructions) over and over again.

d)

hoolahoop, right?

9.

What is the final sum after this loop executes?

a)

Final sum = 10

b)

Final sum = 2

c)

Final sum = 0

10.

What is the output to the console for the featured program?

a)

8

b)

len(name)

c)

4

d)

Samantha

11.

What is the output to the console for the featured program?

a)

False

b)

True

c)

cat

d)

concatenation

12.

Which keyword is used to make a decision in Python?

a)

if

b)

else

c)

for

d)

while

13.

Which function is used to get user input in Python?

a)

read_input()

b)

get_input()

c)

user_input()

d)

input()

14.

When defining a function, the definition must occur before it is called.

a)

true

b)

false

15.

What does the following code output?

a)

11, 9

b)

16, 16

c)

None, None

d)

225, 117

16.

Order the below into the correct order for an assignment statement in Python. Not all options are used.

​ (a)   ​ (b)   ​ (c)  

Choose from the below words
x
=
7.3
/
@
17.

What is a variable in Python?

a)

A type of Python version

b)

A reserved memory location to store values

c)

A specific Python data type

d)

A command that executes Python scripts

18.

What is loop iteration?

a)

I have no clue..

b)

when things keep going over and over and over

c)

meaning repeating steps (or instructions) over and over again.

d)

hoolahoop, right?

19.

What is a nested loop?

a)

when you utilize birds and nests

b)

when one loop is put inside another loop

c)

letting your computer calculate everything through a nest

d)

i have no clue

20.

What is the output of the code?

a)

6

b)

10

c)

18

d)

12

21.

What is the output of the code?

a)

108

b)

100

c)

113

d)

109

22.

What is the output of the code?

a)

10,000

b)

10,000,000

c)

1,000,000

d)

1,000,000,000,000

23.

What is the output of the code?

a)

2

b)

8

c)

1

d)

0

24.

What is the output of the code?

a)

6

b)

-6

c)

7

d)

13

25.

What is the output of the code?

a)

11

b)

55

c)

0

d)

-11

26.

What is the output of the code?

a)

santa = -20

grinch = -40

b)

santa = 21

grinch = -45

c)

santa = -21

grinch = 45

d)

santa = 1

grinch = 5

27.

What is the output of the code?

a)

flower = 19

seed = 43

b)

flower = 18

seed = 53

c)

flower = 11

seed = 9

d)

flower = 20

seed = 49

28.

What computer science concept stores information to be used later?

a)

Conditional

b)

Variable

c)

Loop

d)

Function

29.

What computer science concept does something different depending on the situation?

a)

Conditional

b)

Variable

c)

Loop

d)

Function

30.

What concept repeats whatever is inside it?

a)

Conditional

b)

Variable

c)

Loop

d)

Function

31.

What data type can hold more than one value?

a)

String

b)

Integer

c)

List

d)

Boolean

32.

What data type would store the value: 6.4?

a)

String

b)

List

c)

Boolean

d)

Float

33.

What data type would store the value: Oranges

a)

String

b)

Float

c)

Boolean

d)

Integer

34.

What data type would store the value: True

a)

Boolean

b)

String

c)

Integer

d)

Float

35.

What data value would store the value: 9?

a)

Float

b)

Integer

c)

String

d)

Boolean

36.

What keyword do you use to start a function?

a)

Function

b)

Def

c)

In

d)

Key

37.

What type of loop do you use to loop through a list?

a)

While..true

b)

Do...while

c)

For...in

d)

Forever

38.

What would you put in an if statement to see if two values are equal?

a)

++

b)

==

c)

//

d)

||

39.

What symbol is used to either add two numbers together or join two strings?

a)

-

b)

=

c)

+

d)

*

40.

What symbol is used to multiply two numbers together?

a)

+

b)

=

c)

*

d)

/

41.

What is the name of the method that is always called when a new object is created from a class?

a)

__start__

b)

__object__

c)

__method__

d)

__init__

42.

A function that can only be used by a class is called?

a)

Method

b)

Conditional

c)

Function

d)

Value

43.

Innovation

a)

A new or improved idea, device, product, etc, or the development thereof

b)

A way of representing information using only two options

c)

· A contraction of "Binary Digit"; the single unit of information in a computer, typically represented as a 0 or 1

d)

Time it takes for a bit to travel from its sender to its receiver.

44.

Binary:

a)

A set of rules governing the exchange or transmission of data between devices.

b)

a simplified representation of something more complex. Abstractions allow you to hide details to help you manage complexity, focus on relevant concepts, and reason about problems at a higher level.

c)

A way of representing information using only two options

d)

having multiple backups to ensure reliability during cases of high usage or failure.

45.

Bit

a)

A set of rules governing the exchange or transmission of data between devices.

b)

The number of bits that are conveyed or processed per unit of time. e.g. 8 bits/sec.

c)

Time it takes for a bit to travel from its sender to its receiver.

d)

A contraction of "Binary Digit"; the single unit of information in a computer, typically represented as a 0 or 1

46.

What computer science concept stores information to be used later?

a)

Conditional

b)

Variable

c)

Loop

d)

Function

47.

What computer science concept does something different depending on the situation?

a)

Conditional

b)

Variable

c)

Loop

d)

Function

48.

What concept repeats whatever is inside it?

a)

Conditional

b)

Variable

c)

Loop

d)

Function

49.

What data type can hold more than one value?

a)

String

b)

Integer

c)

List

d)

Boolean

50.

What data type would store the value: 6.4?

a)

String

b)

List

c)

Boolean

d)

Float

51.

What data type would store the value: Oranges

a)

String

b)

Float

c)

Boolean

d)

Integer

52.

What data type would store the value: True

a)

Boolean

b)

String

c)

Integer

d)

Float

53.

What data value would store the value: 9?

a)

Float

b)

Integer

c)

String

d)

Boolean

54.

What keyword do you use to start a function?

a)

Function

b)

Def

c)

In

d)

Key

55.

What type of loop do you use to loop through a list?

a)

While..true

b)

Do...while

c)

For...in

d)

Forever

56.

What would you put in an if statement to see if two values are equal?

a)

++

b)

==

c)

//

d)

||

57.

What symbol is used to either add two numbers together or join two strings?

a)

-

b)

=

c)

+

d)

*

58.

What symbol is used to multiply two numbers together?

a)

+

b)

=

c)

*

d)

/

59.

What is the name of the method that is always called when a new object is created from a class?

a)

__start__

b)

__object__

c)

__method__

d)

__init__

60.

A function that can only be used by a class is called?

a)

Method

b)

Conditional

c)

Function

d)

Value

61.

What is an algorithm?

a)

Patterns and trends used to solve a problem

b)

A set of step-by-step instructions to resolve a problem

c)

A programming language

62.

What are algorithms used for?

a)

To plan out the solution to a problem

b)

As a platform to program a solution

c)

To test a solution to a problem

63.

What are the only two numbers you can use in binary?

a)

0 and 1

b)

1 and 2

c)

1, 2, 3, 4, 5, 6, 7, 8, 9, 10

d)

1, 2, 4, 8, 16

64.

What is the point of binary?

a)

It represents how computers interpret electrical signals

b)

Because we like to make you do extra math

c)

It is fun

d)

Because it describes star systems

65.

How is our number system different from the binary system?

a)

Our number system is base 5; the binary system is base 3

b)

Our number system is base 10; the binary system is base 2

c)

Our number system is base 10; the binary system is base 1

d)

Our number system is base 100; the binary system is base 2

66.

An advantage of programming in Low Level is

a)

Easier for us to understand

b)

Easier to debug

c)

Programs require less file space

67.

A disadvantage of programming in Low Level is

a)

No technical skill is required

b)

Needs to be translated before it can be executed

c)

Difficult for humans to debug

68.

An advantage of programming in High Level is

a)

Easier for us to understand

b)

Useful for device drivers

c)

Programs execute faster than other generations

69.

A disadvantage of programming in High Level is

a)

A lot of code must be translated before it can be executed

b)

Difficult to debug

c)

High level of technical skill is required

70.

Sequencing is…

a)

a list of instructions which are followed in a set order

b)

a list of instructions where there is a choice based on a condition

c)

A list of instructions which will loop based on a condition

d)

A list of instructions which will loop forever

71.

Iteration is...

a)

a list of instructions which are followed in a set order

b)

a list of instructions where there is a choice based on a condition

c)

A list of instructions which will loop based on a condition

d)

A list of instructions which will loop forever

72.

Selection is...

a)

a list of instructions which are followed in a set order

b)

a list of instructions where there is a choice based on a condition

c)

A list of instructions which will loop based on a condition

d)

A list of instructions which will loop forever

73.

2

a)

00

b)

01

c)

10

d)

11

74.

11

a)

2

b)

3

c)

4

d)

5

75.

4

a)

100

b)

101

c)

110

d)

111

76.

101

a)

2

b)

3

c)

4

d)

5

77.

6

a)

100

b)

101

c)

110

d)

111

78.

1100

a)

12

b)

13

c)

14

d)

15

79.

13

a)

1100

b)

1101

c)

1110

d)

1111

80.

1110

a)

12

b)

13

c)

14

d)

15

81.

15

a)

1100

b)

1101

c)

1110

d)

1111

82.

10000

a)

4

b)

8

c)

16

d)

32

83.
Convert 128 to binary
a)
10000000
b)
01111110
c)
10000001
d)
11001100
84.
Convert 11111111 to decimal
a)
255
b)
245
c)
235
d)
225
85.
What are the only two numbers you can use in binary?
a)
0 and 1
b)
1 and 2
c)
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
d)
1, 2, 4, 8, 16
86.

Which of these are the correct place values for binary?

a)

128,64,32,16,8,4,2,1

b)

128, 68,34,12,6,4,2,1

c)

1,0

d)

0,1

87.
If a binary number ends with a 1, it must be...
a)
An odd number
b)
An even number
c)
A prime number
d)
The number 12
88.
What is the denary number system?
a)
It counts the number of dens
b)
Our usual base 10 number system
c)
A special number system for computers
d)
Den Ary's number system
89.
What is the point of binary?
a)
It represents how computers interpret electrical signals
b)
Because we like to make you do extra maths ;-D
c)
For the lulz
d)
Because it describes star systems
90.
How would you write the number two in binary?
a)
1001
b)
0001
c)
0000
d)
0010
91.
Computers can only understand 0s and 1s.
a)
True
b)
False
92.
Binary is made up of which numbers 
a)
3 and 4.
b)
2 and 3.
c)
1 and 2.
d)
0 and 1.
93.
A bit is 
a)
a numerical label assigned to each device.
b)
the smallest unit of data in a computer.
c)
a keyboarding term for typing.
d)
is a numeral system made up of 16 symbols.
94.
A group of 8 bits is known as a gigabyte.
a)
True
b)
False
95.
8 bytes = 1 bit
a)
TRUE
b)
FALSE
96.
How would you write the number 4 in binary code?
a)
0100
b)
0000
c)
0001
d)
0010
97.
Convert 65 to binary
a)
01100001
b)
00100001
c)
01000001
d)
00100101
98.
Convert 254 to binary
a)
11110000
b)
11111100
c)
11111111
d)
11111110
99.
Convert 37 to binary
a)
00100101
b)
00100011
c)
00100111
d)
01000101
100.
Convert 196 to binary
a)
11000110
b)
11100100
c)
11000100
d)
11010100
101.
Convert 00010001 to decimal
a)
17
b)
27
c)
37
d)
47
102.
Convert 11001100 to decimal
a)
224
b)
134
c)
104
d)
204