UCL-EO/geog0111

small error in Exercise 3 in Notebook 015 Control in Python: if

Closed this issue · 1 comments

In Exercise 3 in Notebook 015 Control in Python: if

line 16: month = 'out of bounds error: doy='+doy

The last variable 'doy' is integer and cannot be concatenated with string. The solution would be converting 'doy' into string type:
month = 'out of bounds error: doy=' + str(doy)

Changed to
month = f'out of bounds error: doy={doy}'
which doesn’t rely on type of doy being string