Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARQUIVOS COM RESOLUÇÃO DOS EXERCICIOS #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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