ITI 1120 Chapter Notes - Chapter 5: If And Only If, Empty String, Order Of Newfoundland And Labrador

62 views6 pages

Document Summary

We willl introduce statements for making choices called control flow statements. Control the way the computer executes programs. These statements involve a python type is used to represent truth or false. This type has 2 values and 3 operators. Unlike int or float which can have billions of possible values, bool only has 2: True or false: true and false are values just like 5 or . 27. There are only 3 basic boolean operators: and, or, and, not. Not has the highest precendee followed by and, followed by or. Not - it is applied to just one value. An expression involving not produces true if the original value is false, and vice versa. We can simple just write true, instead of not false, but this is useful for more complex functions. And- binary operator the expression left and right produces true if both left and right is true, and it produces false otherwise:

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents