calculations in python

Solutions on MaxInterview for calculations in python by the best coders in the world

showing results for - "calculations in python"
Andrea
02 Mar 2017
1# 1). Addition use "+" sign
2print(2 + 3)
3
4# 2). Substraction use "-" sign
5print(3 - 2)
6
7# 3). Division use "/" sign
8print(4 / 2)
9
10# 4). Multiplication use "*" sign
11print(4 * 2)
12
13# 5). Exponentiation use "**" sign
14print(4 ** 2)
15
16# 6). Modulus Division use "%" sign
17print(23 & 2)
18
19# 7.) Integer Division use "//" sign
20print(12 // 5)
21
22# Outputs
23
24# 5
25# 1
26# 2
27# 8
28# 16
29# 1
30# 2
similar questions
queries leading to this page
calculations in python