generated from reprograma/onX-sx-temaX
-
Notifications
You must be signed in to change notification settings - Fork 40
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
ThaysaLima
wants to merge
1
commit into
reprograma:main
Choose a base branch
from
ThaysaLima:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Thaysa Lima S02 #18
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
exercicios/para-casa/exerciciosFeitosPorMim/exercicio16.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#Questão 16, feito um parte em grupo. | ||
|
||
import math | ||
|
||
areaPintarM2 = float(input("Qual a medida da área que deseja pintar? ")) | ||
|
||
quantDem2PorLitros = 3.0 | ||
quantDeLitrosNaLata = 18.0 | ||
totalValorLata = 80.0 | ||
|
||
litrosDeTinta = math.ceil(areaPintarM2 / quantDem2PorLitros) | ||
quantDeLatas = math.ceil(litrosDeTinta / quantDeLitrosNaLata) | ||
if litrosDeTinta % 18 != 0: | ||
quantDeLatas += 1 #incremento | ||
|
||
valorTotalCompra = math.ceil(quantDeLatas * totalValorLata) | ||
|
||
print(f"Você vai precisar de {quantDeLatas} latas de tinta") | ||
print(f"O preço total é de R$ {valorTotalCompra:.2f}") | ||
|
24 changes: 24 additions & 0 deletions
24
exercicios/para-casa/exerciciosFeitosPorMim/exercicio17.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#Questão 17, feito em grupo. | ||
|
||
import math | ||
|
||
area = float(input("Digite o tamanho em metros quadrados de área a ser pintada: ")) | ||
litros = area / 6 ##pq 6, pq a cada 1 litros é 6m2 | ||
litrosComFolga = litros * 1.1 ##1.1 é a porcentagem de 10% | ||
|
||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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! |
||
|
||
preco = (latas * 80) + (galoes * 25) | ||
|
||
print(f"Você ira utlizar {latas} latas e {galoes} galões de tinta") | ||
print(f"O preço total é de R$ {preco:.2f}") | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#Faça um programa, com uma função que necessite de três argumentos, e que forneça a soma desses três argumentos. | ||
|
||
def exc_casa(n1, n2, n3): | ||
funcione = nota1 + nota2 + nota3 | ||
return funcione | ||
|
||
nota1, nota2, nota3 = 340, pow(3,7), 90 | ||
|
||
questao_casa = exc_casa(nota1, nota2, nota3) | ||
print("O resultado do calculo a cima é: ",questao_casa) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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!!