COMP10001 Lecture Notes - Lecture 1: Order Of Operations, Elementary Arithmetic, Operand
![](https://new-preview-html.oneclass.com/lAX98ZbWJYdojKx4GZBENn0grqyDPwa7/bg1.png)
+ = addition
○
-
= subtraction
○
/ = division
○
* = multiplication
○
** = exponent
○
% = modulo
○
// = "floor" division (integer division)
○
Basic arithmetic
-
Uses BODMAS to associate operands
-
_ stores the value of the last calculation
-
Python Basics:
print() can be used to print the value of the operand
-
Print function:
Syntax = the arrangement of words and phrases to create well
-
formed sentences in a language
Semantics = the meaning of a word, phrase or text
What operators (functions and methods) can be applied to it
○
Its semantics
○
The type defines
-
int (integer)
○
float (real number)
○
complex (complex number)
○
Number types
-
Types:
Week 1
Thursday, 8 March 2018 2:14 PM
Foundations of Computing Page 1