-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex57.py
More file actions
31 lines (30 loc) · 967 Bytes
/
Copy pathex57.py
File metadata and controls
31 lines (30 loc) · 967 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
n1 = int(input('Digite um número: '))
n2 = int(input('Digite outro número: '))
maior = 0
menor = 0
print('ESCOLHA UMA DAS OPÇÕES ABAIXO:')
print('''\033[1m[1] SOMAR
[2] MULTIPLICAR
[3] MAIOR
[4] NOVOS NÚMEROS
[5] SAIR DO PROGRAMA''')
escolha = 0
while escolha != 5:
escolha = int(input('\033[1;36mDIGITE UMA DAS OPÇÕES ACIMA: '))
if escolha == 1:
print(f'\033[mA soma de {n1} com o {n2} é {n1+n2}')
if escolha == 2:
print(f'\033[mO produto dos números {n1} e {n2} é {n1*n2}')
if escolha == 3:
maior = n1
menor = n2
if maior < n2:
maior = n2
menor = n1
print(f'\033[mO maior número é {maior} e o menor número é {menor}')
if escolha == 4:
n1 = int(input('\033[mDigite um número: '))
n2 = int(input('\33[mDigite outro número: '))
if escolha > 5 or escolha == 0:
print('\033[1;31mOPÇÃO INVÁLIDA')
print('\033[1;31mFIM DO PROGRAMA')