-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
77 changed files
with
364 additions
and
341 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Forma 1 | ||
# Forma 1 | ||
print("Olá Mundo") | ||
|
||
#Forma 2 | ||
# Forma 2 | ||
mensagem = "Olá mundo" | ||
print(mensagem) |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#Entrada de dados | ||
# Entrada de dados | ||
numero1 = int(input("Digite um número :")) | ||
numero2 = int(input("Digite outro numero :")) | ||
soma = numero1+numero2 | ||
|
||
#Saida de dados | ||
# Saida de dados | ||
print("A Soma entre {} e {} vale {} ".format(numero1,numero2,soma)) |
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
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
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 |
---|---|---|
@@ -1,15 +1,12 @@ | ||
''' | ||
# Algoritmo : Calcula o dobro, triplo e a raiz quadrada | ||
# Autor : Lucas Matheus Costa | ||
# Belém, ???/2017 | ||
|
||
''' | ||
|
||
#Importação | ||
# Importação | ||
from math import sqrt | ||
|
||
#Entrada de dados | ||
# Entrada de dados | ||
numero = int(input("Digite um número inteiro :")) | ||
|
||
#Saida de dados | ||
# Saida de dados | ||
print("Dobro : {} \nTriplo : {} \nRaiz quadrada : {:.1f}".format(numero*2,numero*3,sqrt(numero))) |
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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
''' | ||
# Algoritmo : Mostra a média de um aluno em duas avaliações | ||
# Autor: Lucas Matheus Costa | ||
# Belém: ???/2017 | ||
''' | ||
|
||
#Entrada de dados | ||
# Entrada de dados | ||
nota1 = float(input("Digite a nota da primeira avaliação :")) | ||
nota2 = float(input("Digite a nota da segunda avaliação :")) | ||
|
||
#Saída de dados | ||
# Saída de dados | ||
print("A Média do aluno é {:.1f}".format((nota1+nota2)/2)) |
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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
''' | ||
# Algoritmo : Mostra a altura de alguém em metros e converte para centimetros e milimetros | ||
# Autor: Lucas Matheus Costa | ||
# Belém: ???/2017 | ||
''' | ||
|
||
#Entrada de dados | ||
|
||
# Entrada de dados | ||
altura = float(input("Qual a sua altura (em m) :")) | ||
|
||
#Saída de dados | ||
# Saída de dados | ||
print("="*30) | ||
print("A Sua altura em centimetros é : {} cm".format(altura*100)) | ||
print("A Sua altura em milimetros é : {} mm".format(altura*1000)) |
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
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
''' | ||
# Algoritmo : É uma casa de cambio | ||
# Autor: Lucas Matheus Costa | ||
# Belém: ???/2017-19 | ||
''' | ||
|
||
cotacaoUSD = 4 #Considerando a cotação US$ 1,00 = R$ 4,00 | ||
valorNaCarteira = float(input("Quanto é o valor em reais na sua carteira: ")) | ||
#Saída de dados | ||
|
||
# Saída de dados | ||
print("Você tem US$ {:.2f}".format(valorNaCarteira/cotacaoUSD)) |
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 |
---|---|---|
@@ -1,16 +1,14 @@ | ||
''' | ||
# Algoritmo : Calcula a quantidade de tinta necessária para a área de uma parede. | ||
# Autor: Lucas Matheus Costa | ||
# Belém: ???/2017-19 | ||
''' | ||
|
||
#Entrada de dados | ||
# Entrada de dados | ||
alturaDaParede = float(input("Qual a altura da parede em metros :")) | ||
larguraDaParede = float(input("Qual a largura da parede em metros :")) | ||
|
||
#Processamento | ||
# Processamento | ||
areaDaParede = alturaDaParede * larguraDaParede | ||
quantidadeDeTintaNecessaria = areaDaParede/2 # <- Cada litro de tinta suporta até 2m² | ||
|
||
#Saída de dados | ||
# Saída de dados | ||
print("A área da parede é de {:.1f} m² quantidade de tinta necessária é de {:.1f} litros".format(areaDaParede,quantidadeDeTintaNecessaria)) |
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
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 |
---|---|---|
@@ -1,17 +1,15 @@ | ||
''' | ||
# Algoritmo : Bonificaçãp salaria de 15% | ||
# Autor: Lucas Matheus Costa | ||
# Belém: ???/2017-19 | ||
''' | ||
|
||
#Constantes | ||
# Constantes | ||
bonificacaoDeSalario = 15 #<- Esse valor deve variar de 0 á 100 | ||
|
||
#Entrada de dados | ||
# Entrada de dados | ||
salario = float(input("Digite o salário do funcionário (em R$) :")) | ||
|
||
#Processamento | ||
# Processamento | ||
salario = salario + (salario*(bonificacaoDeSalario/100)) | ||
|
||
#Saida de dados | ||
# Saida de dados | ||
print("O Novo salário do funcionário é R$ {:.2f} \033[m".format(salario)) |
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 |
---|---|---|
@@ -1,14 +1,12 @@ | ||
''' | ||
# Algoritmo : Conversor de temperatura | ||
# Autor: Lucas Matheus Costa | ||
# Belém: ???/2017-19 | ||
''' | ||
|
||
#Entrada de dados | ||
# Entrada de dados | ||
grausEmCelsius = float(input("Informe a temperatura em celsius(ºC) :")) | ||
|
||
#Processamento | ||
# Processamento | ||
grausEmFahrenheit = ((9*grausEmCelsius)/5)+32 | ||
|
||
#Saída de dados | ||
# Saída de dados | ||
print("A Temperatura em fahrenheit é {:.1f} ºF".format(grausEmFahrenheit)) |
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 |
---|---|---|
@@ -1,20 +1,18 @@ | ||
''' | ||
# Algoritmo : Aluguel de Carros | ||
# Autor: Lucas Matheus Costa | ||
# Belém: ???/2017-19 | ||
''' | ||
|
||
#Constantes | ||
# Constantes | ||
precoDaDiariaDoCarro = 60 | ||
precoDoKmRodado = 0.15 | ||
|
||
#Entrada de dados | ||
# Entrada de dados | ||
diasAlugados = int(input("Quantos dias foram alugados :")) | ||
kmsRodados = float(input("Quantos quilometros foram rodados :")) | ||
|
||
#Processamento | ||
# Processamento | ||
totalAPagar = diasAlugados * precoDaDiariaDoCarro # <- Incluindo o calculo da diaria | ||
totalAPagar = totalAPagar + kmsRodados * precoDoKmRodado # <- Incluindo o calculo do quilometro rodado | ||
|
||
#Saída de dados | ||
# Saída de dados | ||
print("O Total a pagar é R$ {:.2f}".format(totalAPagar)) |
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 |
---|---|---|
@@ -1,14 +1,12 @@ | ||
''' | ||
# Algoritmo : Truncar um número | ||
# Autor: Lucas Matheus Costa | ||
# Belém: ???/2017-19 | ||
''' | ||
|
||
#Biblioteca | ||
# Biblioteca | ||
from math import trunc | ||
|
||
#Entrada de dados | ||
# Entrada de dados | ||
numero = float(input("Digite um número real :")) | ||
|
||
#Saida de dados | ||
# Saida de dados | ||
print("O número apenas com a parte inteira é {}".format(trunc(numero))) |
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
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 |
---|---|---|
@@ -1,23 +1,21 @@ | ||
''' | ||
# Algoritmo : Calculo de Seno,Cosseno e Tangente | ||
# Autor: Lucas Matheus Costa | ||
# Belém: ???/2017-19 | ||
''' | ||
|
||
#Bibliotecas | ||
# Bibliotecas | ||
from math import sin,cos,tan,radians | ||
|
||
#Entrada de dados | ||
# Entrada de dados | ||
angulo = float(input("Qual o valor do ângulo :")) | ||
|
||
#Processamento | ||
# Processamento | ||
angulo = radians(angulo) | ||
|
||
senoDoAngulo = sin(angulo) | ||
cossenoDoAngulo = cos(angulo) | ||
tangenteDoAngulo = tan(angulo) | ||
|
||
#Saída de dados | ||
# Saída de dados | ||
print("Seno : {:.2f}".format(senoDoAngulo)) | ||
print("Cosseno : {:.2f}".format(cossenoDoAngulo)) | ||
print("Tangente : {:.2f}".format(tangenteDoAngulo)) |
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 |
---|---|---|
@@ -1,22 +1,20 @@ | ||
''' | ||
# Algoritmo : Sorteio de alunos | ||
# Autor: Lucas Matheus Costa | ||
# Belém: ???/2017-19 | ||
''' | ||
|
||
#Bibliotecas | ||
# Bibliotecas | ||
from random import choice | ||
|
||
#Entrada de dados | ||
# Entrada de dados | ||
aluno01 = input("Digite o nome do 1º Aluno :") | ||
aluno02 = input("Digite o nome do 2º Aluno :") | ||
aluno03 = input("Digite o nome do 3º Aluno :") | ||
aluno04 = input("Digite o nome do 4º Aluno :") | ||
|
||
listaDeAlunos = [aluno01,aluno02,aluno03,aluno04] | ||
|
||
#Processamento | ||
# Processamento | ||
escolhido = choice(listaDeAlunos) | ||
|
||
#Saida de dados | ||
# Saida de dados | ||
print("O aluno escolhido foi o(a) {}".format(escolhido)) |
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 |
---|---|---|
@@ -1,21 +1,20 @@ | ||
''' | ||
# Algoritmo : Ordem de apresentação | ||
# Autor: Lucas Matheus Costa | ||
# Belém: ???/2017-19 | ||
''' | ||
#Bibliotecas | ||
|
||
# Bibliotecas | ||
from random import shuffle | ||
|
||
#Entrada de dados | ||
# Entrada de dados | ||
aluno01 = input("Digite o nome do 1º Aluno :") | ||
aluno02 = input("Digite o nome do 2º Aluno :") | ||
aluno03 = input("Digite o nome do 3º Aluno :") | ||
aluno04 = input("Digite o nome do 4º Aluno :") | ||
|
||
listaDeAlunos = [aluno01,aluno02,aluno03,aluno04] | ||
|
||
#Processamento | ||
# Processamento | ||
shuffle(listaDeAlunos) | ||
|
||
#Saida de dados | ||
# Saida de dados | ||
print("O ordem de apresentação será {}".format(listaDeAlunos)) |
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
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
7 changes: 3 additions & 4 deletions
7
Mundo 1 - Fundamentos/23 - Unidade,Dezena,Centena e Milhar.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
Oops, something went wrong.