Python voting program

Asked 2 years ago, Updated 2 years ago, 158 views

I've even gotten candidates input. I'm trying to pick the person who got the most votes, but it's not working I received the item and put it on list1 as append I can't do it next time

list1=[]
j=0
member=int (input ("number of participants:")
for j in list1:
  for w in range(member):
    d=input("What is your choice? (withdrawal:-1) :")
    while d!=-1:
      if d=list1[j]:
        list[j].append()
        j=j+1

python loops

2022-09-22 20:56

1 Answers

List1 is empty

It won't run under for jin list1.


2022-09-22 20:56

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.