We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1627354 commit a7207d7Copy full SHA for a7207d7
1 file changed
labs/lab_1/lab_1b.py
@@ -38,6 +38,7 @@ def simple_calculator(operation: str, num1: float, num2: float) -> float:
38
raise ValueError("Invalid operation. Please choose from 'add', 'subtract', 'multiply', or 'divide'.")
39
40
def request_sanitized_number(prompt: str) -> float:
41
+ #make sure no error when user enters something other than number
42
while True:
43
try:
44
number = float(input(prompt))
0 commit comments