-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex059.py
More file actions
29 lines (29 loc) · 952 Bytes
/
ex059.py
File metadata and controls
29 lines (29 loc) · 952 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
n1 = int(input('Digite um valor: '))
n2 = int(input('Digite outro valor: '))
print('O que vc que fazer com os valores {} e {}? '.format(n1, n2))
opcao = 0
while opcao != 5:
print('''[ 1 ] somar
[ 2 ] multiplicar
[ 3 ] maior
[ 4 ] novos números
[ 5 ] sair do programa''')
opcao = int(input('Qual a sua opção? '))
if opcao == 1:
soma = n1 + n2
print('A soma entre {} + {} é = {}:'.format(n1, n2, soma))
elif opcao == 2:
mult = n1 * n2
print('O produto entre {} * {} é = {}.'.format(n1, n2, mult))
elif opcao == 4:
print('Digite novos numeros: ')
n1 = int(input('Digite um valor: '))
n2 = int(input('Digite outro valor: '))
elif opcao == 3:
if n1 > n2:
maior = n1
print('O numero maior é {}. '.format(n1))
else:
maior = n2
print('O numero maior é {}'.format(n2))
print('Fim do programa!!!')