? whats try block now ? i think the video “Python for everybody is running in old compiler thats why you guys are claiming the false answer as true” as in the previous quesiton there should be an optinos “error” so that i could pass through the quiz.
Just explain me how it works and i will leave this topic it seems like awkward for me as i nevery knew the reply was going to be from somebody so quickly
Buddy, i think you got me wrong. i tried to run the same code in my laptop compiler its showing the error as this is not my first python video i ahve watched multiple videos in youtube to learn i am just here if there is something i am missing about
The quiz question does not say anything about putting other parts of the code into an except block buddy.
The quiz question says " Which line/lines should be surrounded by try block?" buddy.
The options are Line 1, Line 3, Lines 3 and 4, Line 4, or None.
Only one of these is correct buddy.
Like you said buddy, the code without a ‘try’ block has an error, so the last answer cannot be correct buddy.
Which of the remaining 4 answers do you think is the right one buddy? If you tell me which one you think is the correct answer buddy, it is easier for me to explain what that isn’t quite right buddy.
It looks like in your code you put lines 3 and 4 into a try block and line 5 into an except block.
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
Thankyou for your explanation, actually this is my first hours in freecodecamp, i don’t know if you are an AI replying my text or real human so i am sorry for giving your precious time in trouble.
i rewatched the question and found rather saying what will be the answer it was saying where to keep the try block.
Previous question 3-5 were about outputs so i skipped them.