Hacks

  • Explain in your own words what each logical operator does
  • Not displays the opposite of the input,and evaluate two conditions in the same range at the same time, or evaluate two conditions in the different range at the same time.
  • Code your own scenario that makes sense for each logical operator

Not

haveDinner = True
result = not(haveDinner)
print(result)
False

And

money = 163
if money > 75 and money <= 170:
    print("You have enough money")
You have enough money

Or

item = 1
money = 25
if item <= 0 or money > 20:
    print("you can afford it")
you can afford it

Challenge Level 1

myList = ['a', 'e', 'i', 'o', 'u']
letter1 = str(input("Which letter do you want to find?"))
index = myList.index(letter1)
print("The lettter", letter1, "is the", index, "number")
The lettter u is the 4 number

Question 1

The output will be changed

Question 2

Total will be 10. The price will be 15 after one year.

Hacks

  • Create 3 differnt flow charts representing nested statements and transfer them into code. ImageOne
  • Create a piece of code that displays four statements instead of three. Try to do more if you can. I don't know how to do this
  • Make piece of code that gives three different recommendations for possible classes to take at a scholl based on two different condtions. These conditions could be if the student likes STEM or not.