Jul-28-2020, 02:39 PM
count_a = 0 count_b = 0 count_c = 0 char = ['a', 'b', 'c'] for i in range(1, 11): print('Please choose a char from a to c') choice = str(input('-')) if choice in char: print('You have chosen {}'.format(choice)) count_a += 1 elif choice in char: print(('You have chosen {}'.format(choice))) count_b += 1 elif choice in char: print(('You have chosen {}'.format(choice))) count_c += 1 # else: # print('You have chosen an unavailable char, please try again') print(count_a) print(count_b) print(count_c)