ITI 1120 Study Guide - Final Guide: Abracadabra, Merge Sort, Infiniti Q45

569 views43 pages

Document Summary

For the mathematically inclined, the relationship between // and % comes from this equation, for any two numbers a" and b": (b * (a // b) + a % b) is equal to a. Operators that have two operands are called binary operators. Negation is a unary operator because it applies to one operand: The difference between 2 3 and 0. 6666666666666666 may look tiny. 0. 6666666666666666 in a calculation, then the error may get compounded. In mathematics, = means the thing on the left is equal to the thing on the right. in python, it means something quite different. Assignment is not symmetric: x = 12 assigns the value 12 to variable x, but 12 = x results in an error. Because of this, we never describe the statement x = 12 as x equals 12. instead, we read this as x gets 12 or x is assigned 1.

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

Related Documents