pub-3785248829033902 | Python: Arithmetic Operators | - Big data with Python

| Python: Arithmetic Operators |

The best way to learn new things is to take a practical approach of the things you want to learn. Here is a fragment of code that demonstrates the use of the arithmetic statement in Python:



Æ’ python command

print(28 % 10)
print(28 // 10)
print(1e 2)
print(1e-3)
print('%.2f' % 12.3456789)
print('%e' % 12.3456789)

output

8
2
100.0
0.001
12.35    
  
Previous
Next Post »