Your task
Try converting "oops" to an int. Catch ValueError and print Invalid number.
Expected output
Invalid number
Worked solution
try:
number = int("oops")
except ValueError:
print("Invalid number")Checks compare printed output, not your approach. Several solutions can be valid.
← Back to courses