From 786b4875fb00f0d96d7209c537f9580e39059792 Mon Sep 17 00:00:00 2001 From: AnjaliG927 Date: Tue, 30 Jun 2020 16:29:02 -0400 Subject: [PATCH 1/4] updated slide 22,23 --- css/style.css | 1 + index.html | 12 ++++++--- js/slide22.js | 12 +++++++++ js/slide23.js | 13 ++++++++++ print-interval.html | 60 +++++++++++++++++++++++++++++++++++++++++++++ valid.html | 60 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 154 insertions(+), 4 deletions(-) create mode 100644 print-interval.html create mode 100644 valid.html diff --git a/css/style.css b/css/style.css index d17d83a..694334e 100644 --- a/css/style.css +++ b/css/style.css @@ -1,5 +1,6 @@ body { background-color: navy; + color: white; } diff --git a/index.html b/index.html index ef9a207..a7e4406 100644 --- a/index.html +++ b/index.html @@ -4,14 +4,16 @@ - + + + - + @@ -33,7 +35,9 @@ - + + + The quickest of brown foxes. @@ -45,7 +49,7 @@ diff --git a/js/slide22.js b/js/slide22.js index e69de29..56cb79b 100644 --- a/js/slide22.js +++ b/js/slide22.js @@ -0,0 +1,12 @@ +let userInput = ""; +let result = ""; + +do { + userInput = prompt("Please enter the Integer less than 100"); + if (userInput < 100 && userInput > 0) { + result = userInput * userInput; + console.log("Number squared is:" + result); + break; + } + +} while (userInput > 100 || userInput < 0); \ No newline at end of file diff --git a/js/slide23.js b/js/slide23.js index e69de29..6c8fca3 100644 --- a/js/slide23.js +++ b/js/slide23.js @@ -0,0 +1,13 @@ +let lowerLimit = ""; +let upperLimit = ""; + +do { + lowerLimit = prompt("please enter lower limit"); + upperLimit = prompt("please enter Upper limit"); + if (lowerLimit < upperLimit) { + for (let i = lowerLimit; i < upperLimit; i++) { + console.log(i); + } + break; + } +} while (lowerLimit > upperLimit); diff --git a/print-interval.html b/print-interval.html new file mode 100644 index 0000000..03be968 --- /dev/null +++ b/print-interval.html @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The quickest of brown foxes. + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/valid.html b/valid.html new file mode 100644 index 0000000..44614af --- /dev/null +++ b/valid.html @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The quickest of brown foxes. + + + + + + + + + + + + + + + + \ No newline at end of file From b4e2c1d09a45bef544eb2f1cf31dabf206057c74 Mon Sep 17 00:00:00 2001 From: AnjaliG927 Date: Tue, 30 Jun 2020 16:52:44 -0400 Subject: [PATCH 2/4] updated slide 24 --- index.html | 2 +- js/slide24.js | 18 ++++++++++++++ print-interval.html | 60 --------------------------------------------- valid.html | 60 --------------------------------------------- 4 files changed, 19 insertions(+), 121 deletions(-) delete mode 100644 print-interval.html delete mode 100644 valid.html diff --git a/index.html b/index.html index a7e4406..267eddd 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@ - + diff --git a/js/slide24.js b/js/slide24.js index e69de29..c8ee364 100644 --- a/js/slide24.js +++ b/js/slide24.js @@ -0,0 +1,18 @@ +let mydata = new Array(10); +let userInput = ""; +let userValue = ""; +for (let i = 0; i < 10; i++) { + mydata[i] = 1; +} +console.log(mydata); + +do { + userInput = prompt("Enter the index number"); + if (userInput >= 0 && userInput < 10) { + userValue = prompt("Enter the value for index"); + mydata[userInput] = userValue; + console.log("Modified Array"); + console.log(mydata); + break; + } +} while (userInput < 0 || userInput >= 10); \ No newline at end of file diff --git a/print-interval.html b/print-interval.html deleted file mode 100644 index 03be968..0000000 --- a/print-interval.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The quickest of brown foxes. - - - - - - -
- -
- - - - - - - - - \ No newline at end of file diff --git a/valid.html b/valid.html deleted file mode 100644 index 44614af..0000000 --- a/valid.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The quickest of brown foxes. - - - - - - -
- -
- - - - - - - - - \ No newline at end of file From 8ee6a092463dddce02bc39cfc2f3047c621be3a0 Mon Sep 17 00:00:00 2001 From: AnjaliG927 Date: Tue, 30 Jun 2020 17:04:12 -0400 Subject: [PATCH 3/4] modified slide 24 --- js/slide24.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/js/slide24.js b/js/slide24.js index c8ee364..bc2eea4 100644 --- a/js/slide24.js +++ b/js/slide24.js @@ -8,11 +8,14 @@ console.log(mydata); do { userInput = prompt("Enter the index number"); - if (userInput >= 0 && userInput < 10) { - userValue = prompt("Enter the value for index"); - mydata[userInput] = userValue; - console.log("Modified Array"); - console.log(mydata); + if (userInput < 0 || userInput >= 10) { + console.log("invalid range"); break; } -} while (userInput < 0 || userInput >= 10); \ No newline at end of file + userValue = prompt("Enter the value for index"); + mydata[userInput] = userValue; + console.log("Modified Array"); + console.log(mydata); + + +} while (userInput >= 0 && userInput < 10); \ No newline at end of file From 3b481cb3ac5f7802b11ccdb8be80373cc8f2e08b Mon Sep 17 00:00:00 2001 From: AnjaliG927 Date: Tue, 30 Jun 2020 23:38:00 -0400 Subject: [PATCH 4/4] modified slide 26 --- index.html | 2 +- js/slide25.js | 21 +++++++++++++++++++++ js/slide26.js | 14 ++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 267eddd..0551e11 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@ - + diff --git a/js/slide25.js b/js/slide25.js index e69de29..bc2eea4 100644 --- a/js/slide25.js +++ b/js/slide25.js @@ -0,0 +1,21 @@ +let mydata = new Array(10); +let userInput = ""; +let userValue = ""; +for (let i = 0; i < 10; i++) { + mydata[i] = 1; +} +console.log(mydata); + +do { + userInput = prompt("Enter the index number"); + if (userInput < 0 || userInput >= 10) { + console.log("invalid range"); + break; + } + userValue = prompt("Enter the value for index"); + mydata[userInput] = userValue; + console.log("Modified Array"); + console.log(mydata); + + +} while (userInput >= 0 && userInput < 10); \ No newline at end of file diff --git a/js/slide26.js b/js/slide26.js index e69de29..952cc60 100644 --- a/js/slide26.js +++ b/js/slide26.js @@ -0,0 +1,14 @@ + +let integerArray = []; +for (let counter = 0; counter <= 59; counter++) { + + if (counter <= 1) { + integerArray[counter] = counter; + } else { + integerArray[counter] = integerArray[counter - 1] + integerArray[counter - 2]; + } +} + +for (let i = 0; i < integerArray.length; i++) { + console.log(integerArray[i]); +}