Hi,
I am a beginner trying to learn python and came to a question where I have doubts in its answer. In scientific computing with python course, the python for everybody video course series, I came across a question in its 8th video, that is, More conditional structures. In the main question for going to the next series, I have a doubt.
The code is as follows:
Given the following code:
1. temp = "5 degrees"
2. cel = 0
3. fahr = float(temp)
4. cel = (fahr - 32.0) * 5.0 / 9.0
5. print(cel)
Which line/lines should be surrounded by try block?
The answer is 3rd line and 4th line together but wouldnt that affect the program
if try block is in both 3rd line and 4th line wouldnt it stop executing the rest of the line if some error happens in the third line?
Please someone check and tell me the answer