Vorlesung 2
This commit is contained in:
18
Vorlesung 2/math.py
Normal file
18
Vorlesung 2/math.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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)
|
||||
Reference in New Issue
Block a user