+ 1

Hello, here's a question. I don't understand what needs to be substituted. (Sorry for my bad English)

product = "TV": try: print(product) ____: print("Error")

8th Apr 2024, 1:44 PM
Александр Лобжа
Александр Лобжа - avatar
2 ответов
+ 6
think about how you raise an exception in Python. Which parts and keywords does an exception block typically have?
8th Apr 2024, 1:54 PM
Lisa
Lisa - avatar
+ 1
Александр Лобжа , The "try compound statement" has four possible "clauses" (five if you include except*, but Sololearn doesn't cover that). A hint is that you're supposed to finish creating one of the clauses, but I won't tell you which. Here are the official docs. Sorry they are in English and pretty technical, but it's still the most definitive source I know. https://docs.python.org/3/reference/compound_stmts.html#the-try-statement Also, you have a typo that will cause an IndentationError. It's probably not in the original quiz text, so I'll tell you. product = "TV": should be product = "TV"
9th Apr 2024, 1:47 AM
Rain
Rain - avatar