CSC108H5 Lecture 3: CSC108-lecture3-PythonCalculations

100 views2 pages
Verified Note
13 Sep 2018
School
Course
Professor

Document Summary

Some operations that we use in python are commonly used in basic math. + this symbol is used to add numbers in python. This symbol is used to subtract numbers in python. / this symbol is used to divide numbers in python. * this symbol is used to multiply numbers in python. // this symbol is used for dividing and then rounding down. 6/4 would give 1. 5, but 6//4 would give 1. 0 (rounds down) ** this symbol is used for making exponents, the number in front is the base and the number after is the power. % this symbol is used for finding the remainder of division statement. When 5 is divided by 3 the remainder would be 2, so we use 5%3 to find the remainder,2. There are different types of numbers, some common used numbers are integers and decimals. But in the python language these are called: Floats : floats are decimals, they vary from length.

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