# Lesson 2. Integer and float numbers

### 1/10. Integer arithmetics

We already know the following operations which may be applied to numbers:`+`

, `-`

, `*`

and `**`

. The division

`/`

always gives you a float (a floating-point real number, an object of type `float`

).From high school, you probably remember how to calculate negative powers. We want to provide an example if you don't remember: 2

^{-3}= 1 / ( 2

^{3}) = 0.125. Of course, Python allows you to calculate negative powers just the same way as positive ones:

`print(2 ** -3)`

.The exponentiation

`**`

also returns a float when the power is negative.
#### Instructions

Click "Run" to see what happens in output!

print(17 / 3) print(20 / 4) print(2 ** 4) print(2 ** -3)

Maintainer: Vitaly Pavlenko ([email protected])

Credits to: Denis Kirienko, Daria Kolodzey, Alex Garkoosha, Vlad Sterzhanov, Andrey Tkachev, Tamerlan Tabolov, Anthony Baryshnikov, Denis Kalinochkin, Vanya Klimenko, Vladimir Solomatin, Vladimir Gurovic, Philip Guo

**🐍 Support us 🐍**

Terms and Conditions

Privacy Policy

© 2012–2018