Hop,hop,hop
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
# Programm, welches die Funktion(Programmierung) in Python einführt.
|
||||||
|
|
||||||
|
def summe(summand1,summand2): #Funktion Summe
|
||||||
|
return summand1+summand2
|
||||||
|
|
||||||
|
def potenz(basis,exponent): # Funktion Potenz
|
||||||
|
ergebnis=1
|
||||||
|
for i in range(exponent):
|
||||||
|
ergebnis=ergebnis*basis
|
||||||
|
|
||||||
|
return ergebnis
|
||||||
|
|
||||||
|
|
||||||
|
# Beginn des eigentlichen Hauptprogramms
|
||||||
|
|
||||||
|
print(summe(3,5))
|
||||||
|
print(summe(233,87))
|
||||||
|
|
||||||
|
print(potenz(2,3))
|
1
4. Theorie/Funktionen.md
Normal file
1
4. Theorie/Funktionen.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# Funktionen in Python
|
Reference in New Issue
Block a user