Files
cybr108/lab-02/problem-04.py
T
2026-09-12 21:52:51 -04:00

11 lines
350 B
Python

# Write a Python program that prompts the user to input two numbers and raises a TypeError exception if the inputs are
# not numerical.
def numb_check(x, y):
try:
result = x * y
except TypeError:
print(f"Either {x} and/or {y} are not numbers.")
numb_check(x = input("Enter a number: "), y = input("Enter another number: "))