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

inclusão da atividade da semana 5 #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions exercicios/para-casa/ex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

let nota1 = parseInt(prompt("Nota1"));
let nota2 = parseInt(prompt("Nota2"));
let media =(nota1 + nota2) / 2 ;

if (media <= 5){
alert("Você não passou, prepare-se para recuperação")
} else (media >=7 )
alert("Sorria, você foi aprovado")
Comment on lines +6 to +9
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (media <= 5){
alert("Você não passou, prepare-se para recuperação")
} else (media >=7 )
alert("Sorria, você foi aprovado")
if(media < 5) {
alert("Você reprovou :( ")
} else if (media >= 5){
alert("Você não passou, prepare-se para recuperação")
} else (media >=7 )
alert("Sorria, você foi aprovado")

13 changes: 13 additions & 0 deletions exercicios/para-casa/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="./ex.js"></script>
<title>Document</title>
</head>
<body>

</body>
</html>