Skip to content

Instantly share code, notes, and snippets.

@fchevitarese
Created December 17, 2021 18:16
Show Gist options
  • Save fchevitarese/90d8a8279f949c74ae37a865d766ac58 to your computer and use it in GitHub Desktop.
Save fchevitarese/90d8a8279f949c74ae37a865d766ac58 to your computer and use it in GitHub Desktop.
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