Python 2 Programming Tutorial -
2016-08-29 本文已影响0人
豆表示低调
>>> 3 + 4
7
>>> 3 * 20
60
>>> 12 / 4
3.0
>>> 8 + 2 * 10
28
>>> (8 + 2) * 10
100
>>> 18 / 4
4.5
>>> 18//4
4
>>> 18%4
2
>>> 5 * 5 * 5
125
>>> 5 ** 3
125
>>> tuna = 5
>>> 20 + tuna
25
>>> bacon = 18
>>> bacon / tuna
3.6