Hop,hop,hop
parent
5368be695f
commit
1fa3869c6c
|
@ -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))
|
|
@ -0,0 +1 @@
|
|||
# Funktionen in Python
|
Loading…
Reference in New Issue