Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- # Este software conferte \u00baC em \u00baF e vice versa
- # Elizeu Barbosa Abreu
- print('{:.^40}'.format('CONVERSOR DE TEMPERATURAS'))
- print('{:.>40}'.format(''))
- continua = True
- while continua == True:
- conversao = input('Digite: C para converter \u00baC em \u00baF | F para converter \u00baF em \u00baC | P para parar: ')
- if conversao == 'C' or conversao == 'c':
- c = float(input('Entre com o valor em \u00baC: '))
- f = ((c*9)/5)+32
- print('{:.>40}'.format(''))
- print('{:2.2f}\u00baC => {:2.2f}\u00baF'.format(c,f))
- print('{:.>40}'.format(''))
- elif conversao == 'F' or conversao == 'f':
- f = float(input('Entre com o valor em \u00baF: '))
- c = 5/9*(f-32)
- print('{:.>40}'.format(''))
- print('{:2.2f}\u00baF => {:2.2f}\u00baC'.format(f,c))
- print('{:.>40}'.format(''))
- elif conversao == 'P' or conversao == 'p':
- print('{:.>40}'.format('Bye Bye'))
- continua = False
- else :
- print('Opcao Invalida: Digite C, F ou P')
Add Comment
Please, Sign In to add comment