wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Science "NOT FINISHED"

Total questions: 35

Worksheet time: 35mins

Name
Class
Date
1.

A logic gate:

a)

accepts one input and converts it to a transistor.

b)

converts a microchip to a transistor.

c)

accepts input and produces output.

d)

converts a transistor to a microchip.

2.

What is the output for an AND logic gate when one input is True and one is False?

a)

True

b)

undefined

c)

an error

d)

False

3.

What is the final outcome of p AND q OR r if p is 0, q is 1, and r is 1?

a)

1

b)

0

c)

011

d)

01

4.

Boolean algebra is:

a)

a way to create smaller microchips.

b)

a collection of transistors.

c)

the branch of math that deals with the values True and False.

d)

algebra using hexadecimal numbers.

5.
_______ is how we write code
a)
Syntax
b)
Loops
c)
Variables
d)
Functions
6.

Which of the following are languages of computer ?

a)

Machine Language

b)

Assembly Language

c)

High Level Language

d)

All of above

7.

Java, Python, PHP, and C++ are examples of

a)

low level languages

b)

Graphic arts languages

c)

medium level languages

d)

high level languages

8.

What is machine code?

a)

A programming language that a computer understands

b)

The make and model of a computer

c)

The serial number of a computer

9.
What kind of programming language is Python?
a)
High Level  & Object Orientated
b)
Low Level & Object Orientated
c)
High Level & Procedural
d)
Low Level & Procedural
10.

Why do certain words change color in Python?

a)

To show that they are recognized as key words.

b)

To tell you that these words cannot be used in Python code.

c)

To show you that these words can be clicked.

d)

To tell Python to skip these words when running the code.

11.

Symbols used for entering comments in Python ...?

a)

# This is a Python comment

b)

''' This is a Python comment '''

c)

// This is a Python comment

d)

/* This is a Python comment */

12.
Which one of these is an example of binary data
a)
1A
b)
1001
c)
2
d)
1002
13.
Binary is a
a)
Base 8 system
b)
Base 16 system
c)
Base 2 system
d)
Base 10 system
14.
Why do computers use binary
a)
It is easy to convert binary into hex.
b)
It is easy to count from 0 to 1.
c)
Because that is the way it has always been done.
d)
Computers use electronic switches and circuits to store data, it is quick to read the voltage in a circuit as on or off.
15.
8 in binary is
a)
101
b)
1001
c)
1010
d)
1000
16.

What is the output of an AND gate if its inputs are 1 and 1?

a)

1

b)

0

17.

What is the output Y of this logic cricuit if A = 1, B = 1, and C = 1

a)

0

b)

1

18.

What is the best explanation for why a computer uses boolean logic to manipulate True and False values?

a)

It can only understand 0s and 1s

b)

It runs instructions in a binary code

c)

It doesn't have enough memory to store numbers above 1

d)

It uses transistors which can only be on or off

19.

A single logic gate is an electronic component made of transistors, which does what?

a)

Performs calculations such as binary addition

b)

Performs binary shifts left and right

c)

Combines boolean inputs to produce a boolean output

d)

Executes instructions stored in the main memory

20.

A named blocks of code that are designed to do one specific job is called as________

a)

Loop

b)

Function

c)

Block

d)

Branching

21.

Which keyword to be used to define a function in Python?

a)

def

b)

Local

c)

Rec

d)

Global

22.

How many types of scopes in Python?

a)

1

b)

3

c)

2

d)

4

23.

How many types of functions are there in

python?

a)

2

b)

4

c)

5

d)

6

24.

A_____ variable declared inside the function’s body is known as

a)

File scope

b)

Global scope

c)

Local scope

d)

Function scope

25.

What term is used to describe data passed into/out of a program?

a)

Variable

b)

Loop

c)

Constant

d)

Parameter

26.

What is the difference between a subroutine and a function?

a)

They are the same thing

b)

A subroutine passes values back out to the program, a function does not

c)

A function passes values back out to the program, a subroutine does not

d)

A function can run without being called

27.

What is the Python data type bool stand for?

a)

string

b)

integer

c)

Boolean

d)

float

28.

What does the Python data type str stand for?

a)

string

b)

integer

c)

Boolean

d)

float

29.

What does the Python data type float stand for?

a)

string

b)

integer

c)

Boolean

d)

float

30.

What does the Python data type int stand for?

a)

string

b)

integer

c)

Boolean

d)

float

31.

The type of data element temporarily stored in the computer memory defines:

a)

storage space and the extent of its value

b)

name and storage space

c)

storage space and a storage value

d)

storage value

32.

the Miscellaneous data types are

a)

short and long

b)

date and boolean

c)

string and char

d)

integer and double

33.

the integer data types are

a)

string and char

b)

byte and integer

c)

date and boean

d)

doulbe and decimal

34.

The Binary Integer 01001101 is represented in Denary as:

a)

73

b)

75

c)

77

d)

79

35.

Which one of these binary numbers is the normalised form of 6.5?

6.5 = 00000110.1

a)

0.1011 0011

b)

0.1101 0011

c)

1.1001 0010

d)

1.1010 1010