Skip to content

Commit 32c0438

Browse files
author
dodo
committed
Korrektur der Fehlerkorrektur
1 parent ec21ce8 commit 32c0438

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Level_05/Beispielcode/calculator05.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def quotient():
100100
"""
101101
divid = input("Bitte den Dividenden eingeben: ")
102102
divis = input("Bitte den Divisor eingeben: ")
103-
if int(divis) == 0:
103+
if float(divis) == 0.0:
104104
print("Ungültige Divisor.")
105105
return
106106
result = float(divid) / float(divis)
@@ -116,7 +116,7 @@ def modulo():
116116
"""
117117
divid = input("Bitte den Dividenden eingeben: ")
118118
divis = input("Bitte den Divisor eingeben: ")
119-
if int(divis) == 0:
119+
if float(divis) == 0.0:
120120
print("Ungültige Divisor.")
121121
return
122122
result = int(divid) % int(divis)

0 commit comments

Comments
 (0)