Homework:
Which operator makes each of these expressions true? (There’s more than one right answer!)
“i can” ? “CODE”
float(True) // 7 ? 0.0
“yEET” ? “y e e t”
Is each expression true or false?
(6.3 + 7.2 / 2 == (6.3 + 7.2) / 2) OR NOT(2 * int(7.4) > 14)
(“mat ” > “mate”) != (“for” > “Forward”) AND (7 > 8) != (9 > 6)
What does each code block print after 5 iterations?
# block 1
balance = 900
monthlySpent = 50
balance -= monthlySpent
print(balance)
# block 2
n = 57
n %= 8
Resources:
Class Slides: https://docs.google.com/presentation/d/1bqxrxdfScq97fRPdsi6wJ-Wif6LuSCXVz_E9RotFDg8/edit?usp=sharing
Class Code: https://replit.com/join/fwkbsafdvx-shrav816
Contact info:
shravyassathish@gmail.com (mentor)
Make sure to "Add a comment" with your code to the homework in order to submit your homework assignment!
Recordings for class #3 have been sent out through email :)
1.
> (or >=)
== (or >= or <=)
> (or >=)
2.
True
True
3.
850 800 750 700 650
1 1 1 1 1
>, =, <
False ,False
650,1
Stella W:
1. >,>=,> 2. False, False 3. 650,1
< and > and = work
False False
650,1
> , =, <
False, False
650, 1
>, >=
==, >=, <=
>, >=
2. False, True
3. 650, 1