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

Exercício 1 Logica de Programação #196

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
60 changes: 60 additions & 0 deletions Atividade1_com_senao.por
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
programa
{
funcao inicio ()
{
inteiro op
real num_1, num_2, resultado

escreva("Escolha a operação: 1 - Soma; 2 - Subtração; 3 - Multiplicação; 4 - Divisão \n")
leia(op)

escreva("Digite o primeiro número: \n")
leia(num_1)

escreva("Digite o segundo número: \n")
leia(num_2)

se(op==1)
{
resultado = num_1 + num_2
escreva("\nA soma dos números é igual a: ", resultado)
}
senao
{
se(op==2)
{
resultado = num_1 - num_2
escreva("\nA subtração dos números é igual a:", resultado)
}
senao
{
se(op==3)
{
resultado = num_1 * num_2
escreva("\nA multiplicação dos números é igual a:", resultado)
}
senao
{
se(op==4)
{
resultado = num_1 / num_2
escreva("\nA divisão dos números é igual a:", resultado)
}
}
}

}

}
}
/* $$$ Portugol Studio $$$
*
* Esta seção do arquivo guarda informações do Portugol Studio.
* Você pode apagá-la se estiver utilizando outro editor.
*
* @POSICAO-CURSOR = 851;
* @PONTOS-DE-PARADA = ;
* @SIMBOLOS-INSPECIONADOS = ;
* @FILTRO-ARVORE-TIPOS-DE-DADO = inteiro, real, logico, cadeia, caracter, vazio;
* @FILTRO-ARVORE-TIPOS-DE-SIMBOLO = variavel, vetor, matriz, funcao;
*/
11 changes: 11 additions & 0 deletions Aulas-HTML/exemplos/teste.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Teste</title>
</head>
<body>

</body>
</html>
Binary file added Aulas-HTML/exercicios/aula3/Thumbs.db
Binary file not shown.
6 changes: 3 additions & 3 deletions Aulas-HTML/exercicios/aula3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
<title>Exercício 3</title>
</head>
<body>
<h1>seu nome e sobrenome</h1>
<h1>Michele Santolin</h1>

<img src="./img1.jpg" alt="" />
<img src="./img1.jpg" alt="Uma mulher com uma criança, uma menina. Com as roupas combinando, vestindo um casaco rosa e calça jeans azul claro. A mulher está agachada, colocando uma joelheira na menina, que está com patins em seus pés.."/>

<img src="./img2.jpg" alt="time" />
<img src="./img2.jpg" alt="Pessoas formando um círculo, esticando um dos braços ao centro, formando uma montanha de mãos, em um escritório..."/>
</body>
</html>
60 changes: 60 additions & 0 deletions aula-logica/exercicios/aula2/ex2
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
programa
{
funcao inicio ()
{
inteiro op,
real valor, num_1, num_2, resultado
cadeia sair

sair="s"



enquanto (sair=="s")
{

escreva("Escolha a operação: 1 - Soma; 2 - Subtração; 3 - Multiplicação; 4 - Divisão")
leia(op)

escreva("Digite o primeiro número: \n")
leia(num_1)

escreva("Digite o segundo número: \n")
leia(num_2)

se(op==1)
{
resultado = num_1 + num_2
escreva("\nA soma dos números é igual a: ", resultado)
}
senao
{
se(op==2)
{
resultado = num_1 - num_2
escreva("\nA subtração dos números é igual a:", resultado)
}
senao
{
se(op==3)
{
resultado = num_1 * num_2
escreva("\nA multiplicação dos números é igual a:", resultado)
}
senao
{
se(op==4)
{
resultado = num_1 / num_2
escreva("\nA divisão dos números é igual a:", resultado)
}

}

}
}
escreva("\nDeseja continuar? S/N")
leia(sair)
}
}
}
18 changes: 18 additions & 0 deletions aulas-javascript/exemplos/aula2/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Aula 2 de Javascript</title>
<script src="script.js" defer></script>
</head>

<body>
<p id="saudacao" class="red">Oi gente!</p>
<p>Exemplo de texto 2</p>

<input id="nome" name="nome" />

<input type="button" onclick="mostrarMensagem()" value="Mostrar Mensagem" />
</body>
</html>
39 changes: 39 additions & 0 deletions aulas-javascript/exemplos/aula2/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Exemplo de getElementById
//console.log(document.getElementById('saudacao'));

/* Exemplo de querySelector
let texto = document.querySelector('p');
texto.style.color = 'blue';
*/

/* Exemplo de setAttribute/removeAttribute
document.querySelector('#nome').setAttribute('type', 'text');
document.querySelector('#nome').removeAttribute('name');
*/

/* Exemplo de como "pegar" o valor de um input
document.querySelector('#nome').value; */

/* E quando o valor do input é um número?
document.querySelector('#nome').valueAsNumber; */

/* Exemplo de como alterar o texto de um elemento
document.getElementById('saudacao').innerText = 'Mudei o texto!'; */

/* Exemplo pra adicionar/remover uma classe
//document.getElementById('saudacao').className = 'green';
document.getElementById('saudacao').classList.add('green');
document.getElementById('saudacao').classList.remove('red'); */

/* Exemplo adicionar/remover um elemento
let div = document.createElement('div');
div.innerText = 'Div criada!';
document.body.append(div);

document.getElementById('saudacao').remove();
*/

/* Exemplo de click
function mostrarMensagem() {
alert('Oi gurias!');
} */
19 changes: 19 additions & 0 deletions aulas-javascript/exemplos/aula3/exercicio1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Menu de navegação</title>
<link rel="stylesheet" href="style.css" />
<script src="script.js" defer></script>
</head>

<body>
<ul>
<li class="active">Home</li>
<li>Sobre</li>
<li>Blog</li>
<li>Contato</li>
</ul>
</body>
</html>
8 changes: 8 additions & 0 deletions aulas-javascript/exemplos/aula3/exercicio1/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
let items = document.querySelectorAll('ul > li');

items.forEach((item) => {
item.onclick = function () {
document.querySelector('ul > li.active').classList.remove('active');
item.classList.add('active');
};
});
8 changes: 8 additions & 0 deletions aulas-javascript/exemplos/aula3/exercicio1/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.active {
color: #d040b3;
}

ul > li {
display: inline-block;
padding: 15px;
}
14 changes: 14 additions & 0 deletions aulas-javascript/exemplos/aula3/exercicio2/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Criando uma notificação</title>
<link rel="stylesheet" href="style.css" />
<script src="script.js" defer></script>
</head>

<body>
<button onclick="showNotification()">Mostre a notificação!</button>
</body>
</html>
22 changes: 22 additions & 0 deletions aulas-javascript/exemplos/aula3/exercicio2/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
function showNotification() {
let notification = document.createElement('div');
notification.innerHTML = 'Deu tudo certo!';
notification.className = 'notification success';
document.body.append(notification);

setTimeout(() => {
notification.style.opacity = 1;
});

setTimeout(() => {
removeNotification(notification);
}, 4000);
}

function removeNotification(notification) {
notification.style.opacity = 0.1;

setTimeout(() => {
notification.remove();
}, 500);
}
17 changes: 17 additions & 0 deletions aulas-javascript/exemplos/aula3/exercicio2/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.success {
background-color: #c3ddc3;
border: 1px solid #567b56;
color: #567b56;
}

.notification {
width: 300px;
padding: 15px;
border-radius: 5px;
margin-top: 15px;
position: absolute;
right: 20px;
top: 20px;
opacity: 0;
transition: opacity 500ms;
}
23 changes: 23 additions & 0 deletions aulas-javascript/exemplos/aula3/exercicio3/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Validação de formulário</title>
<script src="script.js" defer></script>
</head>

<body>
<form>
<div>
<label for="email">Email</label>
<input id="email" name="email" type="email" />
</div>
<div>
<label for="senha">Senha</label>
<input id="senha" name="senha" type="password" />
</div>
<button type="submit" disabled>Enviar</button>
</form>
</body>
</html>
Loading