Codington
0 of 6 problems solved • 0%

Exercise prompt

Predict the Valid Readings

A sensor occasionally sends text instead of a number. Follow the loop through one failed conversion.

Predict the output

Which lines reach the console, and in what order?

total = 0 for cell in ["2", "ERR", "3"]: try: total += int(cell) except ValueError: print("Skipped") print(total)
What will this code print?