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

Igea Martins - Semana 2 #32

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Igea Martins - Semana 2 #32

wants to merge 2 commits into from

Conversation

igeam
Copy link

@igeam igeam commented Aug 17, 2023

Exercícios da semana 2

qGaloes2 = #dúvida mortal
vTLG = (qLatas2 * 80) + (qGaloes2 * 25)

if (metragem % 97.2 == 0):
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 é errado usar 97.2, mas imagine em você mesma daqui dois meses olhando esse código. O que significa 97.2?

vTG = qGaloes * 25

#elif3
qLatas2 = #dúvida mortal
Copy link
Collaborator

Choose a reason for hiding this comment

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

A quantidade de latas é calculada igual no primeiro exercício, mas sem usar o arredondamento pra cima.
E o cálculo de galões é feito com o resto de tinta que faltou em latas, arredondado pra cima, pra garantir que não vai faltar.

Copy link
Author

Choose a reason for hiding this comment

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

obrigada Belisa! entendi agora que é mais simples do que a forma como eu queria fazer. Já tó aplicando isso nos exercícios de Estrutura de Decisão :)

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