Unit 1
Unit 2
Unit 3
Unit 4
100

What is putting information into a computer?

input.

100

What does % do?

it gives the remainder of the number.

100

if(x = 2)

Whats wrong with the code above?

there should be ==

100

What does a while loop do?

it repeats code until a condition is meet.

200

What does the command int( do?

Change a string to a number.

200

what should you do before using random.randint()?

you need to import random.

200

what are the 3 conditions to an if statement

and, or, not

200

What is information sent to a function as?

a parameter.

300

What data type is used to store words?

str(

300

x = 5

print("The number is: " + x * 3)


What is wrong with the code above?

A str( is needed.

300

What are the conditions are needed for an if statement to work?

indent their code block.

300

T/F

Do algorithms repeat indefinitely?

False

400

What memory system do computers use?

binary

400

print("Enter 3 numbers: ")
a = float(input("Enter a number: "))
b = float(input("Enter a number: "))
c = float(input("Enter a number: "))
print(a + b + c / 3)


if a was 6, b was 7, and c was 12 what would the result be?

17

400

when do you use and elif statement compared to an if else statement?

To check multiple expressions for true and execute a block of code as soon as one of the conditions evaluate to true.

400

What does range (11, 34, 2) do?

it prints the odd numbers between 11 and 33/34

500

What does \\ do?

it does nothing.

500

what does fabs( do?

it converts a number to a float.

500

T/F

Do algorithms have an order?

True

500

for i in range (x, y):     print (i, end=" ")

what two numbers return 10 11 12 13 14 15 16 17 18 19

X= 10

Y= 20

M
e
n
u