CISC 101 Lecture Notes - Lecture 11: Exponentiation, Data Type, Operator Associativity

58 views3 pages

Document Summary

25 / 10 evaluates to 2. 5 (basically actually divide) Truncaing division is denoted by // providing a truncated result based on the type of operands applied to. 25 / 10 evaluates to 2 (basically remove the decimal) When both operands are integers => result is a truncated integer referred to as integer division. When one of the operands is a loat truncated loaing point. An expression is a combinaion of symbols that evaluates to a value. An expression can also consist of a single literal or variable. 4 + (3 * k) has two sub expressions: To write a comment, start the line with # . Well for operators following the associaive law doesn"t mater for addiion. Division and subtracion, do not follow the associaive law. Just go from lef to right just to be safe. Except for exponeniaion, that"s right to lef. A set of operators that may be applied to thosemater values.

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