CSCI 1105 Lecture 6: Decisions - 20 Sep 2018

34 views3 pages
Verified Note

Document Summary

20 sep 2018 lec #6 decisions. Allows a program to carry out different actions depending on the nature of the data to be processed (dr siegel, powerpoint, slide 5) Lots of python construction are compound statements. Consist of a header and a statement block. Must have a colon : at the end of the header. Start on the line after the header and ends at the first statement indented less than the first statement in the block. (dr siegel, powerpoint, slide 16) Compares two values with an operator ( >, =, ==) Comparison operators are lower than arithmetic operators. Calculation are on the right side of the comparison or assignment operator. Make something true - assignment (house = 10) different from check if something is true. Equality testing (house == 10) (dr siegel, powerpoint, slide 30) You cannot compare a string to a number. (dr siegel, powerpoint, slide 34)

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