Not Sure Why This isn't working?
Its not completed but it just keeps repeating same thing and i did not program it to do that can someone help
You are viewing a single comment. View All
what does it keep repeating? please provide more context. it looks like it runs fine to me...
@LizFoster that is just the random function though - if you choose a number 1-4, 1, 2, and 3 are much more likely, and come up almost all the time. The reason it always prints
Your number is 4is because he wrote
print("Your number is 4"). It repeats because it is in a while loop. There is nothing going wrong there...
@sugarfi the code isn't fully completed yet but the problem is that if you are the most voted (4) then dead should equal true and the game ends but that doesn't happen even if 4 is the most voted (the variable you) it just asks you who the mafia is again. Instead of saying you died and the mafia wins that is the problem.