Python Useful Code

# Import power function from math module
from math import sqrt
from math import pow

print("Hello world")
x = 1
y=2
print(x+y)
print(17 + 35 * 2)

print(type("3 Musketeers"))

a, b, c = 1, 2, 3
print(c)

π = 3.14159
r= 4
print(2 * π * r)

print(π * pow(r,2))

print(sqrt(r))

print(pow(r,3))

Add Comment