What you are going to learn.
- How to do basic arithmethic in Python.
- Learn about the Modulo operation.
- Learn about the Float variable type.
- Learn a key difference between Python 2 and Python 3
>>> 2 + 3
5
>>> 100 - 20
80
>>> 100 + 20 - 80
40
>>> 2 * 2
4
>>> 2*2
4
>>> 2 * 2
4
>>> 2 / 4
0.5
>>> 10/5
2.0
>>> 1/2
0.5
>>> type(2)
<class 'int'>
>>> type(0.5)
<class 'float'>
>>> 5 % 3
2
>>>
No comments:
Post a Comment