ENGINEER 1D04 Chapter Notes - Chapter 7: Boolean Expression, George Boole, Relational Operator

41 views2 pages
scarletotter976 and 37168 others unlocked
ENGINEER 1D04 Full Course Notes
4
ENGINEER 1D04 Full Course Notes
Verified Note
4 documents

Document Summary

Decision structures: are statements that allow a program to execute different sequences of instructions for different cases, effectively allowing the program to choos an appropriate course of action. The diamond boxes in the flowchart show conditional decisions. Relational operators are (, and >=). A common mistake in python programs is using = in conditions where a == is required. Conditions may compare either numbers or strings. When strings are compared, the ordering is lexicographic, which means that strings are put in alphabetic order, so upper-case letters come before lower case letters. Conditions are type of expressions, called boolean expression after george boole. In python the two-way decision can be implemented by attaching an else clause onto an if clause. Putting one compound statement inside of another is called nesting tryexcept statement is used to catch any kind of error.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents