votos = [0, 0, 0]
for i in range(10):
    print("Vota por el candidato 1, 2 o 3")
    voto= int(input())
    if 1 <= voto <= 3:
        votos[voto - 1] += 1
    else:
        print("Voto inválido")
        
print(f"Candidato 1: {votos[0]} votos")
print(f"Candidato 2: {votos[1]} votos")
print(f"Candidato 3: {votos[2]} votos")

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: