I’m at step 14 and keep getting this error. I typed in the exact code from the hints. I’m not sure why my code is not working. I’d really appreciate your feedback.
Also, how can I see the scatterplot on the local page?
cocoa_percents = []
cocoa_percent_tags = soup.select(".CocoaPercent")
for td in cocoa_percent_tags[1:]:
percent = int(td.get_text().strip('%'))
cocoa_percents.append(percent)
Traceback (most recent call last):
File "script.py", line 37, in <module>
percent = int(td.get_text().strip('%'))
ValueError: invalid literal for int() with base 10: '73.5'