PYTHON CORE · LESSON 34
When the mistake happened.
try and except · about 13 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Dial the error handling unit. Check the indentations.
try:
number = int("abc")
except ValueError:
print("Не число")Open the editor for class workSolve it yourself
Try turning the word «кот» into a number inside try. In except ValueError, output «Не число». Name the variable number.
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework