Unit 1
Unit 2
Unit 3
Unit 4
100

sound, video, and on screen text?

output

100

What is the difference between modular division and normal division?

  1. Modular → Remainder

100

What are nested ifs and why do we use them?

Nested ifs is putting one if statement inside another and we use them to check if a condition is true or false multiple times.

100

What is the difference between a computer model and simulations?

Computer models recreate realistic scenarios, simulations are experiments based off of them.

200

Information in the real world?

Analog

200
  1. What is a terabyte?

  1. 2^40 bytes

200
  1. Write the code if the variable x is the same as zero, if it is, print “x = 0”

if(x == 0):

      print(“x = 0”)

200

Write a loop that counts back from 80 to 2 (You can only count back by even numbers)

for i in range(80,0,-2):

    print(i)

300

If the computer loses power all information is lost here?

Main memory

300
  1. Write out the math functions from the math module?

  1. math.pow(a,b)

  2. math.sqrt(a)

  3. math.fabs(a)

300

What is a boolean?

A boolean is a keyword used to test conditions if it is true.

300

Identify the parameter in the following code:

    X = int(input(“Enter a number: “))

    Y = int(input(“Enter a number: “))

    if(X>Y):

        print(“X is greater than Y”)

    else:

        print(“Y is greater than X”)



x and y

400

What does IDE stand for, and what is it?

  1. Integrated Development Environment; Also called a programming environment, it allows the user to write the program, run the program, and debug the program all within one application.

400
  1. 43154782%3223 (no calculator)

  1. 2035

400

What are 5 things that algorithms must have?

Have an order, have clear instructions,  operations that can be done by a computer, produce a result, and stop in a finite amount of time

400

What’s a count variable, and what is it used for?

A variable written into code that counts how many times a loop runs, and stops it once the set limit is met.

500
  1. Correct the errors to make the output;

.name = input(‘’Enter a name: ‘’)

Adj1 = Input(‘’Enter an adjective: ‘’)

adj2 = input(‘’Enter an adjective: ‘’)

adv = input(‘’Enter an adverb: ‘’)

food1 = input(‘’Enter a food: ‘’)

food2 = input(‘’Enter another food: ‘’)

noun = input(Enter a noun: ‘’)0

place = input("Enter a place: ‘’)

vb = input("Enter a verb: ‘’)

print("Let's play Silly Sentences!\p’’)

print(name - ‘’ was plannng a dream vacation to ‘’ + place + ‘’,’)

print(name + ‘’ was specially looking forward to trying the local\n’cuisine, including " = adj1 _ ‘’ ‘’ + food1 0 ‘’ and ‘’ + food2 + ‘’.\p’’)

print(name + " will have to practice the language " + adv + " to\pmake it easier to ‘’ + vd + ‘’ with people.\p’’)

print(name + " has a long list of lights to see, including the\p" + Noun + " museum and the " + adJ2 + " park")

  1. .Let's play Silly Sentences!


  2. Enter a name: Grace

  3. Enter an adjective: stinky

  4. Enter an adjective: blue

  5. Enter an adverb: quietly

  6. Enter a food: soup

  7. Enter another food: bananas

  8. Enter a noun: button

  9. Enter a place: Paris

  10. Enter a verb: jump


  11. Grace was planning a dream vacation to Paris.

  12. Grace was especially looking forward to trying the local

  13. cuisine, including stinky soup and bananas.


  14. Grace will have to practice the language quietly to

  15. make it easier to jump with people.


  16. Grace has a long list of sights to see, including the

  17. button museum and the blue park.

500
  1. This code is meant to find the greatest out of 11 numbers. Fix the code on the board:

n1 = float(input("Enter a number: ")

n2 = floa(input("Enter a number: )

n3 = float(input(Eter a number: "))

n = flat(input("Enter a number: ")

n5 = (input("Enter a number: "))

n6 = float(input(Enter anumber: "))

n7 = loat(input("Enter a number: ")

n8 = floatinput("Enter a number: "))

n = flot(input(Enter a number: ))

n1 = float(input("Enter a number: "))

n1 = input("Enter a number: "))

min(n1, n2, n3, n4, n5, n6, n7, n, n9, n1)

  1. n1 = float(input("Enter a number: "))

  2. n2 = float(input("Enter a number: "))

  3. n3 = float(input("Enter a number: "))

  4. n4 = float(input("Enter a number: "))

  5. n5 = float(input("Enter a number: "))

  6. n6 = float(input("Enter a number: "))

  7. n7 = float(input("Enter a number: "))

  8. n8 = float(input("Enter a number: "))

  9. n9 = float(input("Enter a number: "))

  10. n10 = float(input("Enter a number: "))

  11. n11 = float(input("Enter a number: "))


  12. print(max(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11))

500
  1. x = 43

if(x == 43):

    pr!nt("x = 43")

    x = x / 0

    if(x == 54)

    print("True") #what is output

Line 3: SyntaxError: bad token T_OP

500

What is wrong with the following code?

X = integer(input(“Enter a number’):

while(x!=0):

        print(x)

2nd Quotation Mark

No loop control variable





M
e
n
u