Skip to content
PingpingPapa edited this page Feb 10, 2022 · 3 revisions

factorial

import math

print(math.factorial(5))
# 120

sqrt

import math
print(math.sqrt(7))
# 2.6457513110645907

gcd

import math
print(math.gcd(21,14))
# 7

constant number

import math

print(math.pi)
#3.141595

print(math.e)
#2.718281828

Home

Home

Python Basic
a
Library

bc

Algorithm
b
Clone this wiki locally