Files
ProgrammierungUndDatenanalyse/Vorlesung 2/math.py
dev weycloud 5562abd79b Vorlesung 2
2021-09-23 19:58:44 +02:00

18 lines
466 B
Python

# Das Modul "math"
import math as m
# Einige wichtige Funktionen:
# exp(x) # return e**x
# log(a[,b]) # returns log of x to the base b
# sqrt(x) # Wurzel aus x
# pi # Zahl PI
# e # eulersche Zahl
# comb(n,k) # Binominalkoeffizient
# fabs(x) # returns absolut value of x
# gcd(a,b) # returns GGT
# pow(x,y) # berechnet x hoch y
# 2³ = 8
twoPower3 = m.pow(2, 3)
print("2³ =", twoPower3)