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

Thaysa Lima S02 #18

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

Thaysa Lima S02 #18

wants to merge 1 commit into from

Conversation

ThaysaLima
Copy link

No description provided.


latas = int(litrosComFolga/18) ##uma lata tem 18 litros
resto = litrosComFolga % 18 ## a % é o resto
galoes = math.ceil(resto/3.6) ##vai ser o resto pois ele é menor que a lata, pois como vai faltar na lata um "restinho para completar", usamos o resto aqui em baixo.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Arrasou nos comentários. Eu prefiro usar variáveis ao invés de valores numéricos, mas a explicação da conta nos comentários ajuda muito!


litrosDeTinta = math.ceil(areaPintarM2 / quantDem2PorLitros)
quantDeLatas = math.ceil(litrosDeTinta / quantDeLitrosNaLata)
if litrosDeTinta % 18 != 0:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Arrasou usando uma alternativa a função do math.ceil que não tinhamos visto ainda.
Parabéns!!

@ThaysaLima ThaysaLima changed the title Exercicios para casa, check. Thaysa Lima S02 Sep 19, 2023
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