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

Atividade app.js #114

Open
wants to merge 9 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
14 changes: 14 additions & 0 deletions ecma/basic-bmi/lais.maria/basic-bmi.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const weight = 200;
const height = 1.5;
const bmi = weight / height **2;
let result;
if (bmi < 18.5){
result = "underweight"
}else if (bmi < 24.9){
result = 'normal weight'
} else if (bmi < 29.9){
result = 'overweight'
} else {
result = 'obesity'
}
console.log(result)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const tam = 10
let soma = 0

for (n = 1; n <= 10; n++){
soma+= 1/n;
}
console.log(soma)
2 changes: 2 additions & 0 deletions ecma/basic-hello/lais.maria/basic-hello.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const nome = 'Luiz'
console.log("Hello!" + nome)
19 changes: 19 additions & 0 deletions ecma/basic-irrf/lais.maria/basic-irrf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
let imp;
let salario = 3500.00;

if (salario <= 1903.98){
imp = 0;
}
else if (salario < 2826.65){
imp = (salario * 7.5)/100 - 142.80;
}
else if (salario < 3751.05){
imp = (salario * 15.0)/100 - 354.80;
}
else if (salario < 4664.68){
imp = (salario * 22.5)/100 - 636.13;
}
else{
imp = (salario * 27.5)/100 - 869.36;
}
console.log(imp)
15 changes: 15 additions & 0 deletions ecma/basic-number-series/lais.maria/basic-number-serie.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
let result = '';

for (let flag = 0; flag < 100; flag++){
if (flag < 10){
result+='0'+flag;
}else{
result+=flag;
}
if (flag % 10 === 9){
result += '\n'
}else{
result+= ' ';
}
}
console.log(result)
3 changes: 3 additions & 0 deletions ecma/function-sum/lais.maria/function-sum.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function soma(n1, n2){
some
Copy link
Member

Choose a reason for hiding this comment

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

return n1 + n2;

}
1 change: 1 addition & 0 deletions students/lais.maria/20181780011.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Laís Maria Paz Nóbrega de Lima
28 changes: 28 additions & 0 deletions web/node-hello-lang/lais.maria/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const http = require("http");
const url = require("url");

const hostname = "127.0.0.1";
const port = 3000;

const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader("Content-Type", "text/plai; charset=utf-8");
//res.setEncoding('UTF-8');

// if (req.url === "pt") {
// res.end("Olá mundo!");
// } else if (req.url === "en") {
// res.end("Hello world!");
// }

const hello = {
"/pt": "Olá mundo!",
"/en": "Hello world!"
};

res.end(hello[req.url]);
});

server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
15 changes: 15 additions & 0 deletions web/node-hello-simple/lais.maria/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const http = require("http")

const hostname = "127.0.0.1";
const port = 3000;

const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World');
});

server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});