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

pull request #80

Open
wants to merge 8 commits into
base: master
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
31 changes: 31 additions & 0 deletions conceitosBasicos/ex2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!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">
<title>Atividade2</title>
</head>

<body>
<script>


var qtdLinhas = Number.parseInt(prompt('Digite a quantidade de linhas: '));
for (let i = 0; i < qtdLinhas; i++) {

var resto = i % 2;
if (resto == 0) {
console.log('# # # # ');
}
else {
console.log(' # # # #');
}
console.log('\n');
}

</script>
</body>

</html>
29 changes: 29 additions & 0 deletions conceitosBasicos/ex3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!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">
<title>Atividade3</title>
</head>

<body>
<script>

var palavra = prompt('Digite uma palavra')
var Epalindromo = palavra.split('').reverse().join(''); //funções que "reviram a palavra"

if (palavra === Epalindromo) {
console.log('A Palavra é Palindromo');
}
else
{
console.log('A palavra nao é Palindromo')
}


</script>
</body>

</html>
37 changes: 37 additions & 0 deletions conceitosBasicos/ex4.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!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">
<title>Atividade4</title>
</head>

<body>
<script>


for (var i = 1; i <= 100; i++) {

var resultadoTres = i % 3;
var resultadoCinco = i % 5;
if (resultadoTres == 0 && resultadoCinco == 0) {
console.log("FizzBuzz");
}
else if(resultadoCinco == 0)
{
console.log("Fizz");
}
else if(resultadoTres == 0){
console.log("Buzz");
}
else{
console.log(i);
}
}

</script>
</body>

</html>
43 changes: 43 additions & 0 deletions funções/ex1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!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">
<title>Atividade1PT2</title>
</head>

<body>
<script>

var numUm = Number.parseFloat(prompt('Digite um numero: '));
var numDOis = Number.parseFloat(prompt('Digite outro numero '));
function min(a, b) {
if (a < b) {
return a;
}
else if (b < a){
return b;
}
else{
return a;
}
}
function max(a, b) {
if (a > b) {
return a;
}
else if (b > a){
return b;
}
else{
return a ;
}
}
console.log("o menor eh " (numUm, numDOis));
console.log("o maior eh " + max(numUm, numDOis));
</script>
</body>

</html>
30 changes: 30 additions & 0 deletions funções/ex2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!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">
<title>Atividade2PT2</title>
</head>

<body>
<script>

var numero = Number.parseFloat(prompt("Digite um numero: "));

function mod2(numero) {
var resultado = numero % 2;
if (resultado == 0) {
return true;
}
else {
return false;
}
}
console.log(mod2(numero));

</script>
</body>

</html>
32 changes: 32 additions & 0 deletions funções/ex3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!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">
<title>Atividade3PT2</title>
</head>

<body>
<script>

var frase = prompt('Digite uma frase: ');
var letra = prompt('Digite uma letra: ');

function countChars(frase, c) {
var count = 0;
for (let i = 0; i <= frase.length; i++) {

if (frase[i] == c) {
count++;
}
}
return count;
}
console.log(countChars(frase, letra));

</script>
</body>

</html>
29 changes: 29 additions & 0 deletions objetos e arrays/ex1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!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">
<title>Atividade1PT3</title>
</head>

<body>
<script>

var min = Number.parseInt(prompt('Digite o numero min: '));
var max = Number.parseInt(prompt('Digite o numero max: '));
var inter = Number.parseInt(prompt('Digite um intervalo: '));

function range(max, min, intervalo) {
var numbers = new Array();
for (let i = (min+1); i < max; i+= intervalo) {
numbers.push(i);
}
return numbers
}
console.log(range(max, min, inter));
</script>
</body>

</html>
24 changes: 24 additions & 0 deletions objetos e arrays/ex2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!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">
<title>Atividade2PT3</title>
</head>

<body>
<script>

lista = [100,101,102,103,104,105];
function reverseArray(array) {
var arrayRev = array.reverse();
return arrayRev;
}
console.log(reverseArray(lista));

</script>
</body>

</html>