#!/usr/bin/env python3 # Pretend this was user input x = '7' y = 'o' total = 0 # We need to catch the exception this should be a ValueError try: total = int(x) + int(y) print(total) except: print('Something bad happened') print(total) # l = list(range(1,11)) l = [0] * 10 print(l) try: l[4] = 22 print(l) except: print('Tried to access a bad index.')