Python Jumpstart by Building 10 Apps Transcripts
Chapter: App 4: Journal app and file I/O
Lecture: Core concept: Complex conditionals
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
These complex conditionals are one of our core concepts from this app, so look at this code here. We have a variable X, and Y, and Z.
0:12
And we would like to run something if X is somehow false, either in number or boolean or something like this,
0:18
and the combination of Z is not 2 or Y is false, not Y, right, so here is how you write that in Python. We say if not x and (z != 2 or not y)
0:34
Now I think complex conditionals in Python make tons of sense, and it's quite straightforward,
0:40
the one exception to this sort of English language version of boolean logic where you say the words and or not is the not equal to
0:50
or greater than or less than parts, so they sort of use symbols but other than that think English when you are doing your conditionals.