From 4e8696a3ae643fa099e3a03b315c85b00a27c6fc Mon Sep 17 00:00:00 2001 From: David Frary Date: Tue, 30 Jun 2020 15:21:09 -0400 Subject: [PATCH 1/8] finished edits on 'index.html' --- edit-array.html | 58 ++++++++++++++++++++++++++++++++++++++++ fibonacci.html | 58 ++++++++++++++++++++++++++++++++++++++++ print-interval.html | 58 ++++++++++++++++++++++++++++++++++++++++ index.html => valid.html | 0 4 files changed, 174 insertions(+) create mode 100644 edit-array.html create mode 100644 fibonacci.html create mode 100644 print-interval.html rename index.html => valid.html (100%) diff --git a/edit-array.html b/edit-array.html new file mode 100644 index 0000000..90b6915 --- /dev/null +++ b/edit-array.html @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The quickest of brown foxes. + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fibonacci.html b/fibonacci.html new file mode 100644 index 0000000..283a9a2 --- /dev/null +++ b/fibonacci.html @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The quickest of brown foxes. + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/print-interval.html b/print-interval.html new file mode 100644 index 0000000..aca21bb --- /dev/null +++ b/print-interval.html @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The quickest of brown foxes. + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/index.html b/valid.html similarity index 100% rename from index.html rename to valid.html From f67b77f51229c8348a629a2e9be5209b4ceac674 Mon Sep 17 00:00:00 2001 From: David Frary Date: Tue, 30 Jun 2020 20:05:44 -0400 Subject: [PATCH 2/8] finished edits on 'slide22.js' --- css/style.css | 2 +- js/file-inject.js | 0 js/header-functions.js | 2 +- js/slide22.js | 17 +++++++++++++++++ valid.html | 3 ++- 5 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 js/file-inject.js diff --git a/css/style.css b/css/style.css index d17d83a..fa42c31 100644 --- a/css/style.css +++ b/css/style.css @@ -1,5 +1,5 @@ body { - background-color: navy; + background-color: white; } diff --git a/js/file-inject.js b/js/file-inject.js new file mode 100644 index 0000000..e69de29 diff --git a/js/header-functions.js b/js/header-functions.js index ff2614d..f8b882f 100644 --- a/js/header-functions.js +++ b/js/header-functions.js @@ -1,5 +1,5 @@ // import jquery-3.4.0 -document.write(''); +document.write(''); document.write(''); // import `utils.js` diff --git a/js/slide22.js b/js/slide22.js index e69de29..10dde2c 100644 --- a/js/slide22.js +++ b/js/slide22.js @@ -0,0 +1,17 @@ + + +//Do While Statement +// do{ +// statements +// } +// while (condition); + + + +let userInput; +do{ + userInput = prompt("Enter a number between 0 and 100:"); +} +while( isNaN(userInput) || userInput < 0 || userInput > 100 ); + +console.log(userInput); \ No newline at end of file diff --git a/valid.html b/valid.html index ef9a207..703c13d 100644 --- a/valid.html +++ b/valid.html @@ -14,6 +14,7 @@ + @@ -36,7 +37,7 @@ - The quickest of brown foxes. + From 5d70a587e99446faf9b1f3ee712c4ad905b09bb8 Mon Sep 17 00:00:00 2001 From: David Frary Date: Tue, 30 Jun 2020 22:04:39 -0400 Subject: [PATCH 3/8] finished edits on 'slide22.js' --- js/slide22.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/js/slide22.js b/js/slide22.js index 10dde2c..1c002a8 100644 --- a/js/slide22.js +++ b/js/slide22.js @@ -7,11 +7,12 @@ // while (condition); - -let userInput; -do{ - userInput = prompt("Enter a number between 0 and 100:"); -} -while( isNaN(userInput) || userInput < 0 || userInput > 100 ); - -console.log(userInput); \ No newline at end of file +let userInput = ""; +while (userInput = prompt ("Enter a number between 1 and 100:")){ + if (isNaN(userInput) || userInput < 0 || userInput > 100){ + alert ("Re-enter number between 1 and 100:"); + } else { + console.log(userInput); + break; + } +} \ No newline at end of file From 0f8ba1ace0858bba22f3bd4c4a287818d2f1ac93 Mon Sep 17 00:00:00 2001 From: David Frary Date: Tue, 30 Jun 2020 22:06:10 -0400 Subject: [PATCH 4/8] finished edits on 'slide22.js' --- js/slide22.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/slide22.js b/js/slide22.js index 1c002a8..7bdc5a8 100644 --- a/js/slide22.js +++ b/js/slide22.js @@ -9,7 +9,7 @@ let userInput = ""; while (userInput = prompt ("Enter a number between 1 and 100:")){ - if (isNaN(userInput) || userInput < 0 || userInput > 100){ + if (isNaN(userInput) || userInput < 1 || userInput > 100){ alert ("Re-enter number between 1 and 100:"); } else { console.log(userInput); From 138d2aec29d8b18683cc5bb66882da23a7447bd7 Mon Sep 17 00:00:00 2001 From: David Frary Date: Tue, 30 Jun 2020 22:14:49 -0400 Subject: [PATCH 5/8] finished edits on 'slide22.js' --- js/slide22.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/slide22.js b/js/slide22.js index 7bdc5a8..bed95cb 100644 --- a/js/slide22.js +++ b/js/slide22.js @@ -13,6 +13,9 @@ while (userInput = prompt ("Enter a number between 1 and 100:")){ alert ("Re-enter number between 1 and 100:"); } else { console.log(userInput); + console.log(userInput + " squared is: " + userInput * userInput); break; } -} \ No newline at end of file +} + + From b78251ca46337c432d4551cc48000f7f50c5e9a6 Mon Sep 17 00:00:00 2001 From: David Frary Date: Thu, 2 Jul 2020 15:22:40 -0400 Subject: [PATCH 6/8] finished edits on 'slide23.js' --- js/slide22.js | 8 -------- js/slide23.js | 11 +++++++++++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/js/slide22.js b/js/slide22.js index bed95cb..1386937 100644 --- a/js/slide22.js +++ b/js/slide22.js @@ -1,12 +1,4 @@ - -//Do While Statement -// do{ -// statements -// } -// while (condition); - - let userInput = ""; while (userInput = prompt ("Enter a number between 1 and 100:")){ if (isNaN(userInput) || userInput < 1 || userInput > 100){ diff --git a/js/slide23.js b/js/slide23.js index e69de29..690108a 100644 --- a/js/slide23.js +++ b/js/slide23.js @@ -0,0 +1,11 @@ + + + +let userInput1=prompt("Please enter L: "); +let userInput2=prompt("Please enter U: "); + +for(let i=userInput1;i<=userInput2;i++) + +{ + console.log(i) +} From ab8499e157048937c38adffcc915919af9aa9fb3 Mon Sep 17 00:00:00 2001 From: David Frary Date: Fri, 3 Jul 2020 19:54:40 -0400 Subject: [PATCH 7/8] finished edits on 'slide24.js' --- js/slide24.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/js/slide24.js b/js/slide24.js index e69de29..a5be796 100644 --- a/js/slide24.js +++ b/js/slide24.js @@ -0,0 +1,20 @@ + +let myData = [10]; +let userInput1; +let userInput2; + +for (let i = 0; i < 10; i++) { + myData[i] = 1; +} +console.log(myData) + +while(userInput1 = prompt("Enter the index: ")&&(userInput2 = prompt("Enter the new index: "))) { + if ((isNaN(userInput1 && userInput2) || userInput1 && userInput2 < 0 || userInput1 && userInput2 > 10)) { + alert("Out of range!"); + break; + } + else{ + myData[userInput1] = parseInt(userInput2); + console.log(myData) + } +} From 31a131cdd184a5a5395e5af09f1dfccadc364548 Mon Sep 17 00:00:00 2001 From: David Frary Date: Fri, 3 Jul 2020 20:50:10 -0400 Subject: [PATCH 8/8] finished edits on 'slide25.js' --- js/slide24.js | 2 +- js/slide25.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/js/slide24.js b/js/slide24.js index a5be796..b131a6f 100644 --- a/js/slide24.js +++ b/js/slide24.js @@ -9,7 +9,7 @@ for (let i = 0; i < 10; i++) { console.log(myData) while(userInput1 = prompt("Enter the index: ")&&(userInput2 = prompt("Enter the new index: "))) { - if ((isNaN(userInput1 && userInput2) || userInput1 && userInput2 < 0 || userInput1 && userInput2 > 10)) { + if ((isNaN(userInput1 && userInput2) || userInput1 && userInput2 < 0 || userInput1 && userInput2 > 10)) { alert("Out of range!"); break; } diff --git a/js/slide25.js b/js/slide25.js index e69de29..670c101 100644 --- a/js/slide25.js +++ b/js/slide25.js @@ -0,0 +1,10 @@ +let Fibonacci = []; +let i; + +Fibonacci[0] = 0; +Fibonacci[1] = 1; + +for (i = 2; i <= 10; i++) { + Fibonacci[i] = Fibonacci[i - 2] + Fibonacci[i - 1]; +} +console.log(Fibonacci); \ No newline at end of file