diff --git a/ecma/basic-bmi/lais.maria/basic-bmi.js b/ecma/basic-bmi/lais.maria/basic-bmi.js new file mode 100644 index 0000000..5eb59bc --- /dev/null +++ b/ecma/basic-bmi/lais.maria/basic-bmi.js @@ -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) \ No newline at end of file diff --git a/ecma/basic-harmonic-series/lais.maria/basic-harmonic-series.js b/ecma/basic-harmonic-series/lais.maria/basic-harmonic-series.js new file mode 100644 index 0000000..30360b9 --- /dev/null +++ b/ecma/basic-harmonic-series/lais.maria/basic-harmonic-series.js @@ -0,0 +1,7 @@ +const tam = 10 +let soma = 0 + +for (n = 1; n <= 10; n++){ + soma+= 1/n; +} +console.log(soma) \ No newline at end of file diff --git a/ecma/basic-hello/lais.maria/basic-hello.js b/ecma/basic-hello/lais.maria/basic-hello.js new file mode 100644 index 0000000..248c0f2 --- /dev/null +++ b/ecma/basic-hello/lais.maria/basic-hello.js @@ -0,0 +1,2 @@ +const nome = 'Luiz' +console.log("Hello!" + nome) diff --git a/ecma/basic-irrf/lais.maria/basic-irrf.js b/ecma/basic-irrf/lais.maria/basic-irrf.js new file mode 100644 index 0000000..2a9b56a --- /dev/null +++ b/ecma/basic-irrf/lais.maria/basic-irrf.js @@ -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) \ No newline at end of file diff --git a/ecma/basic-number-series/lais.maria/basic-number-serie.js b/ecma/basic-number-series/lais.maria/basic-number-serie.js new file mode 100644 index 0000000..e0e2616 --- /dev/null +++ b/ecma/basic-number-series/lais.maria/basic-number-serie.js @@ -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) \ No newline at end of file diff --git a/ecma/function-sum/lais.maria/function-sum.js b/ecma/function-sum/lais.maria/function-sum.js new file mode 100644 index 0000000..a209ae5 --- /dev/null +++ b/ecma/function-sum/lais.maria/function-sum.js @@ -0,0 +1,3 @@ +function soma(n1, n2){ + some +} \ No newline at end of file diff --git a/students/lais.maria/20181780011.txt b/students/lais.maria/20181780011.txt new file mode 100644 index 0000000..1062b6b --- /dev/null +++ b/students/lais.maria/20181780011.txt @@ -0,0 +1 @@ +Laís Maria Paz Nóbrega de Lima \ No newline at end of file diff --git a/web/node-hello-lang/lais.maria/app.js b/web/node-hello-lang/lais.maria/app.js new file mode 100644 index 0000000..90e1d62 --- /dev/null +++ b/web/node-hello-lang/lais.maria/app.js @@ -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}/`); +}); diff --git a/web/node-hello-simple/lais.maria/app.js b/web/node-hello-simple/lais.maria/app.js new file mode 100644 index 0000000..862f2ef --- /dev/null +++ b/web/node-hello-simple/lais.maria/app.js @@ -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}/`); + }); + \ No newline at end of file