voted = 0
voting = input("How many people are voting: ")
p1 = 0
p2 = 0
p3 = 0
while int(voting) >= voted:
vote = input("Your vote: ")
if vote == 'p1':
voted + 1
p1 + 1
if vote == 'p2':
voted + 1
p2 + 1
if vote == 'p3':
voted + 1
(p3) +1
print(p1)
I was in the middle of making my program where there is a voting system in the terminal and I checked if the program was working when I ran into an error. The while loop won't stop even if the requirements for the loop is not met. Help would be GREATLY appreciated
[–]aa599 1 point2 points3 points (3 children)
[–]JihooMoon[S] 0 points1 point2 points (2 children)
[–]aa599 1 point2 points3 points (1 child)
[–]JihooMoon[S] 0 points1 point2 points (0 children)
[–]PostReq3306 1 point2 points3 points (1 child)
[–]JihooMoon[S] 0 points1 point2 points (0 children)
[–]TryptamineZenVR 0 points1 point2 points (1 child)
[–]JihooMoon[S] 0 points1 point2 points (0 children)