Skip to content

Conversation

@marialeandro0
Copy link

ARQUIVOS COM RESOLUÇÃO DOS EXERCICIOS

ARQUIVOS COM RESOLUÇÃO DOS EXERCICIOS
lataLitros = 18
lataPreco = 80

latasNecessarias = litrosNecessarios / lataLitros
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quase. Mas há um porém: Se o resultado da divisão não for exato, por exemplo 35/18, o resultado será 1 e faltará tinta.

precoNecessario = lataPreco * latasNecessarias

print("Latas necessárias abaixo.")
print(int(latasNecessarias))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Não está errado, mas porque você converteu latasNecessárias para inteiro ao imprimir?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants