lesson hack 3.5
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
haveDinner = True
result = not(haveDinner)
print(result)
money = 163
if money > 75 and money <= 170:
print("You have enough money")
item = 1
money = 25
if item <= 0 or money > 20:
print("you can afford it")
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")
Hacks
- Create 3 differnt flow charts representing nested statements and transfer them into code.
- 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.