Created
December 17, 2021 18:16
-
-
Save fchevitarese/90d8a8279f949c74ae37a865d766ac58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
medida = int(input('Digite a medida (em metros): ')) | |
if medida <= 0: | |
print(f'Esta medida {str(medida)} é inválida', end='') | |
else: | |
mt = 'metro' | |
cm = 'centimetro' | |
mil = 'milimetro' | |
if medida > 1: | |
mt += 's' | |
cm += 's' | |
mil += 's' | |
print(f'Isto tem {medida} {mt}, ou', end=' ') | |
print(f'{medida * 100} {cm}, ou', end=' ') | |
print(f'{medida * 1000} {mil}.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment