Day 3

Day 3 was all about conditions , comparisons and combinations of those. In the morning I didn’t have time to finish everything so I had to wrap up after dinner. In the end I ended up with a nice Treasure Island game that can be found on my GitHub. During my regular working hours I again also spent a whole lot of time in Powershell 🙂

Notes:

conditions
if condition:
    do something
elif other_condition:
    do_something_else
else:
    do something_different

Comparison operators
>   gt
<   lt
>=  ge
<=  le
==  eq
!=  ne

modulo = divide gives remainder
7 % 3
3+3+1 modulo = 1
7 % 2
2+2+2 +1

combining
and
or

if a = 15 and b = 1:

not reverses
a = 18
if not a > 15
false

 

Comments are closed.