-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex059.py
More file actions
26 lines (24 loc) · 753 Bytes
/
ex059.py
File metadata and controls
26 lines (24 loc) · 753 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
num1 = int(input('Digite um número: '))
num2 = int(input('Digite outro: '))
print('Digite uma das opções a seguir: ')
opcao = 0
while opcao != 5:
print('[1] Somar \n[2] Multiplicar \n[3] Maior \n[4] Novos números \n[5] Sair')
opcao = int(input('Digite aqui a opção desejada: '))
if opcao == 1:
print(num1 + num2)
elif opcao == 2:
print(num1 * num2)
elif opcao == 3:
if num1 > num2:
print(num1)
else:
print(num2)
elif opcao == 4:
num1 = int(input('Digite um número: '))
num2 = int(input('Digite outro: '))
elif opcao == 5:
print('Finalizando...')
else:
opcao = int(input('Opção inválida, tente novamente: '))
print('Fim')