Okay, I have gotten rid of some of the unnecessary code, but I am still receiving error messages. Here is my code:
print('Welcome to the Urban ') import json import username import favartist def userfav(): userfav = input('Please select your favorite artist: \n ') a = 'Yes' or 'yes' ab = 'No' or 'no' if userfav == 'Drake': subs = input('Would you like to subscribe to notifications for Drake?:') if subs == a: print('Thank you for subscribing') elif subs == ab: print('You ca subscribe later') else: print('Selection is invalid') elif userfav == 'J.Cole': subs = input('Would you like to subscribe to notifications for J.Cole?:') if subs == a: print('Thank you for subscribing') elif subs == ab: print('You ca subscribe later') else: print('Selection is invalid') elif userfav == 'Anderson Paak': subs = input('Would you like to subscribe to notifications for Drake?:') if subs == a: print('Thank you for subscribing') ussubem() elif subs == ab: print('You can subscribe later') def ussubem(): a = True sub_e = input('Please enter your subscription email: \n ') return print('Thank you, will now receive regular emails about The Urban Macchiato to,' + sub_e) userfav() ussubem() def writesub(ussubem): with open('usersub.json', 'w+') as f: json.dump(sub_em, f) writesub(ussubem)