-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmision3.py
More file actions
33 lines (27 loc) · 764 Bytes
/
Copy pathmision3.py
File metadata and controls
33 lines (27 loc) · 764 Bytes
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
energia = 100
nivel = 2
activo = True
# Estado de alerta
virus_detectado = True
sistema_secundario_dañado = False
if energia < 50:
activo = False
print("Energía crítica, suspendiendo operaciones.")
elif virus_detectado and not sistema_secundario_dañado:
energia -= 20
print("Defendiendo sistema primario, energía restante:", energia)
else:
energia += 10
print("Recuperando recursos, energía:", energia)
if energia > 50:
activo = True
print("Sistemas funcionales, energía:", energia)
# Entrada de usuario
codigo = input("Introduce código de autorización: ")
if codigo == "ALFA":
energia += 20
else:
energia -= 10
print("Nivel de energía:", energia)
print("Nivel:", nivel)
print("Nivel de actividad:", activo)