Hi! Please provide errors and solutions for the code. Also, what to do when two lists have the same value?
P.S. Can this be also done using dictionaries? If possible please let me know. Also, I have just started learning python. So please be kind enough to answer in a simple language. Thanks a tonne in advance. Here's the code- gryffindor=0 slytherin=0 hufflepuff=0 ravenclaw=0 user=input('how do you describe yourself-cunning/daring/loyal/sharp?') if user=='cunning': slytherin+=1 elif user=='daring': gryffindor+=1 elif user=='loyal': hufflepuff+=1 elif user=='sharp': ravenclaw+=1 last=input('What\'d you do in a difficult faceoff-face enemy/negotiate/fight enemy/wait?') if last=='face enemy': hufflepuff+=1 elif last=='negotiate': slytherin+=1 elif last=='fight enemy': gryffindor+=1 elif last=='wait': ravenclaw+=1 final=int(input('please press 1 ro see the result:')) sort=[gryffindor,slytherin,hufflepuff,ravenclaw] i=0 while i<=3: if final==1: print(max(sort)) else: print('the value entered is invalid kindly enter again') i+=1