Question 1

print("Should we go outside?")
isCold = False
isRaining = True
if isCold == True:
    print("Stay inside it's cold")
if isRaining == True:
    print("Stay inside, it's raining")
Should we go outside?
Stay inside, it's raining

Question 2

import random

attempts = 0
tempScore = 0
bestScore = 0
while attempts < 4:
    tempScore = random.randint(1,10)
    print(tempScore)
    if tempScore > bestScore:
        bestScore = tempScore
    attempts += 1
print("Your highest score is", bestScore)
Your highest score is 10

Question 3

finishLine = false

while finishLine = false:

    if canMoveForward:
        moveForward()

    else:
        if canMoveRight:
            rotateRight()
            moveforward()

    if goalTouch = true:
        finishLine = true

Question 5

As the binary tree expands, you can see the process of how it works. It starts by splitting the index in half. It then searches the first and second half to see where to go. From either half, it keeps cutting each smaller index portion until the number 69 is found

Question 7

["Market", "Walmart", "store", "Target", "Ralphs"]

Question 8

Binary search is far more efficient than sequential search because it cuts the list in half vs having to check each index. This logrithmically is ways faster than sequential and can save a lot of time