IFB104 Lecture Notes - Lecture 4: Order Of Operations, Computer Keyboard, Eval

173 views2 pages
8 Nov 2018
School
Course
Professor

Document Summary

The boolean type: based around two values; true or false. Some relational operators: boolean expressions involving numeric values typically use relational operators, each of these expressions will return true or false. Some of these operators work on strings to: x > y, x < y, x >= y, x <= y, x == y, x != y, x in y. A note on syntax: variables use = to assign meaning, so equality must use =: used by most modern computer languages. In mathematics, operators have a precedence order (pemdas, bomdas: boolean operators follow a precedence, whenever there is doubt, use brackets, note in programming, boolean is evaluated left to right. Keyboard input: python provides two functions for getting keyboard input. Function input returns whatever is entered on the keyboard as a string. It accepts an optional parameter which is displayed on the screen as a prompt.

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