-
moduloes (%) : % vs / in number, 8%2=0 , 8//2=4.0, 9/2=4.5, 9//2=4
-
booleans:
-
if is_vegan: print("vegan")
-
is_rich=balance>1_000_000
-
and:
True and True=True
True and False= False
False and True =False [short]
False and False =False [short]
-
or:
True or True =True [short]
True or False=True [short]
False or True=True
False or False=False
-
if number: = if number!=0, if number has value
-
if not name= if !number (cannot write this syntax, only with "not")
-
-
loops into:
2 main types : range (know the amount), until condition happens
- while condition is true, enter, else exit the loop:
- while x<11:
-
Notifications
You must be signed in to change notification settings - Fork 0
ShaniStaretz-ai/python-lec4-08-sep-24
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
modulus ,Booleans
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published