-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex03.py
More file actions
73 lines (61 loc) · 2.62 KB
/
Copy pathex03.py
File metadata and controls
73 lines (61 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
voto1 = input("informe qual premio deseja ganhar: PLAYSTATION, XBOX ou NINTENDO ")
voto2 = input("informe qual premio deseja ganhar: PLAYSTATION, XBOX ou NINTENDO ")
voto3 = input("informe qual premio deseja ganhar: PLAYSTATION, XBOX ou NINTENDO ")
voto4 = input("informe qual premio deseja ganhar: PLAYSTATION, XBOX ou NINTENDO ")
voto5 = input("informe qual premio deseja ganhar: PLAYSTATION, XBOX ou NINTENDO ")
playstation = 0
xbox = 0
nintendo = 0
if voto1.upper() == "PLAYSTATION":
playstation = playstation + 1
elif voto1.upper() == "XBOX":
xbox = xbox + 1
elif voto1.upper() == "NINTENDO":
nintendo = nintendo + 1
else:
print("O Colaborador 1 digitou um console inexistente e seu voto sera desconsiderado")
print("Playstation: {}\nXbox: {}\nNintendo: {}" .format(playstation, xbox, nintendo))
if voto2.upper() == "PLAYSTATION":
playstation = playstation + 1
elif voto2.upper() == "XBOX":
xbox = xbox + 1
elif voto2.upper() == "NINTENDO":
nintendo = nintendo + 1
else:
print("O Colaborador 2 digitou um console inexistente e seu voto sera desconsiderado")
print("Playstation: {}\nXbox: {}\nNintendo: {}" .format(playstation, xbox, nintendo))
if voto3.upper() == "PLAYSTATION":
playstation = playstation + 1
elif voto3.upper() == "XBOX":
xbox = xbox + 1
elif voto3.upper() == "NINTENDO":
nintendo = nintendo + 1
else:
print("O Colaborador 3 digitou um console inexistente e seu voto sera desconsiderado")
print("Playstation: {}\nXbox: {}\nNintendo: {}" .format(playstation, xbox, nintendo))
if voto4.upper() == "PLAYSTATION":
playstation = playstation + 1
elif voto4.upper() == "XBOX":
xbox = xbox + 1
elif voto4.upper() == "NINTENDO":
nintendo = nintendo + 1
else:
print("O Colaborador 4 digitou um console inexistente e seu voto sera desconsiderado")
print("Playstation: {}\nXbox: {}\nNintendo: {}" .format(playstation, xbox, nintendo))
if voto5.upper() == "PLAYSTATION":
playstation = playstation + 1
elif voto5.upper() == "XBOX":
xbox = xbox + 1
elif voto5.upper() == "NINTENDO":
nintendo = nintendo + 1
else:
print("O Colaborador 5 digitou um console inexistente e seu voto sera desconsiderado")
print("Playstation: {}\nXbox: {}\nNintendo: {}" .format(playstation, xbox, nintendo))
if playstation > xbox and playstation > nintendo:
print ("O Console escolhido foi playstation") #ou usar dois if (um dentro do outro)
elif xbox > playstation and xbox > nintendo:
print("O console escolhido foi o Xbox")
elif nintendo > playstation and nintendo > xbox:
print("O console escolhido foi o Nintendo ")
else:
print("Houve empate, favor entrar em contato com a direção")