Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

IST P-STEM Unit 1 Hardware and Python Review

Total questions: 20

Worksheet time: 14mins

Name
Class
Date
1.

Which of the following is an input device?

a)

mouse

b)

speaker

c)

monitor

d)

printer

2.

Which of the following is true about main memory?

a)

main memory is used for long-term data storage

b)

main memory is the short-term memory also known as RAM

c)

main memory is preserved in the computer system even when the power is turned off or lost

d)

a solid state drive (SSD) is an example of main memory in a computer system

3.

Which of the following software controls the memory of the computer?

a)

operating system (OS)

b)

compiler

c)

Python

d)

applications

4.

What is the correct order of steps that a compiler uses in translating code?

a)

Translate commands to machine language. Check for mistakes. Run the commands.

b)

Check for mistakes. Translate commands to machine language. Run the commands.

c)

Run the commands. Check for mistakes. Translate commands to machine language.

d)

Run the commands. Translate commands to machine language. Check for mistakes.

5.

Which of these is an example of output?

a)

Displaying information on the screen

b)

Storing data in main memory

c)

Converting code to machine language

d)

Putting information into the computer

6.

Which of the following is a legal variable name?

a)

tempVar

b)

70nums

c)

&&data

d)

num of mins

7.

Two categories of variable data types are:

a)

Strings and integers

b)

Strings and words

c)

integers and numbers

d)

words and floats

8.

What command is used to change a number into a String?

a)

str()

b)

int()

c)

dec()

d)

print()

9.

What is output by the following?

print("Row\nRow\nRow yer boat")

a)

Row

Row

Row yer boat

b)

Row\nRow\nRow yer boat

c)

Row Row Row yer boat

d)

Row Row

Row yer boat

10.

What is output by the following?

print(type("121"))

a)

<class 'str'>

b)

<class 'num'>

c)

error. unknown identifier

d)

<class 'int'>

11.

What is output by the following? Assume the user enters 12 and 25.

x = input("Enter a number: ")

y = input("Enter a number: ")

print("Values are: " + x + y)

a)

Values are: 1225

b)

Values are: 37

c)

error. data type mismatch

d)

Values are: xy

12.

What symbol is used to begin a comment in Python?

a)

#

b)

com()

c)

str()

d)

*

13.

What is output by the following program?

x = "wrench"

y = x

z = "hammer"

print(x + " " + y + "\n" + z)

a)

wrench wrench

hammer

b)

wrench x hammer

c)

wrench wrench hammer

d)

wrench x

hammer

14.

What does the program do?

num1 = int(input("Enter a number: ")

num2 = int(input("Enter a number: ")

print("The answer is: " + str(num1 + num2))

a)

the program accepts two integers as input and prints out the sum

b)

the program accepts two numbers as input and prints the answer

c)

the program outputs: The answer is: num1 + num2

d)

the program accepts two integers as input and prints out the two numbers again

15.

Consider the following code:

x = input("How old are you? ")

print(x)

What data type is stored in x?

a)

String

b)

integer

c)

float

d)

word

16.

What is a downside (disadvantage) of converting information from an analog to a digital format?

a)

Some of the detailed information is lost

b)

When the power is turned off, information is lost

c)

Limits the technology available

d)

Digital information takes up too much space in memory

17.

When is it a good idea to use integers instead of Strings?

a)

When doing calculations with whole numbers

b)

When processing large amounts of data

c)

When we want to store someone's username and password

d)

When a variable is holding both words and numbers

18.

Which of the following statements about computers is true?

a)

Computers do not always need electricity to operate

b)

Computing devices translate analog information into a digital format in order to process and store it

c)

The CPU is the long-term memory center of the computer

d)

The RAM is the brain of the computer that processes commands

19.

Convert the decimal number 14 into binary:

a)

1110

b)

1111

c)

1101

d)

1100

20.

Convert the binary number 1001100 into decimal:

a)

76

b)

74

c)

78

d)

80