A Pen by christiane gozza on CodePen.
Created
September 15, 2022 02:56
-
-
Save chritianegozza/ca4dedd11619055e2201f9a015005738 to your computer and use it in GitHub Desktop.
Calculadora de média
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
<html> | |
<head> | |
<title> Imersão Dev Alura - Aula 01</title> | |
</head> | |
<body> | |
<div class="container"> | |
<h1 class="page-title"> | |
Calculadora de média</h1> | |
<p class="page-subtitle"> | |
Descubra qual a sua média de nota de todas as provas! | |
</p> | |
<img src="https://www.alura.com.br/assets/img/imersoes/dev-2021/logo-imersao-conversor-de-moedas.svg" class="page-logo" alt=""> | |
</div> | |
<a href="https://alura.com.br/" target="_blank"> | |
<img src="https://www.alura.com.br/assets/img/home/alura-logo.svg" alt="" class="alura-logo"> | |
</a> | |
</body> | |
</html> |
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
//são as variáveis | |
let nome = "Christiane"; | |
let notaPrimeiroBimestre = 10; | |
let notaSegundoBimestre = 7; | |
let notaTerceiroBimestre = 6.5; | |
let notaQuatroBimestre = 9; | |
//soma de nota e usando o parseInt para arrendonda a nota que dá em numeros quebrados | |
let notaFinal = parseInt(notaPrimeiroBimestre + notaSegundoBimestre + notaTerceiroBimestre + notaQuatroBimestre) / 4; | |
//O método toFixed() formata um número utilizando notação de ponto fixo. | |
let notaFixa = notaFinal.toFixed(1); | |
//console imprimi o programa no console | |
console.log("Bem vindo " + nome); | |
console.log(notaFinal); | |
//Revisão | |
//variáveis, strings, console.log, toFixed, operações Matemática(soma e divisão), concatenação |
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
body { | |
font-family: 'Roboto Mono',monospace; | |
min-height: 400px; | |
background-image: url('https://caelum-online-public.s3.amazonaws.com/imersao-dev-3/bg.png'); | |
background-color: #000000; | |
background-size: 80vh; | |
background-position: center bottom; | |
background-repeat: no-repeat; | |
} | |
.container { | |
text-align: center; | |
padding: 20px; | |
height: 100vh; | |
} | |
.page-title { | |
color:#ffffff; | |
margin: 0 0 5px; | |
} | |
.page-subtitle { | |
color:#ffffff; | |
margin-top: 5px; | |
} | |
.page-logo { | |
width: 200px; | |
} | |
.alura-logo { | |
width: 40px; | |
position: absolute; | |
top: 10px; | |
right: 10px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
atualização