From 5a6e24592314076aab05013bb592b24c12b05f94 Mon Sep 17 00:00:00 2001 From: bilal-nasr <80160978+bilal-nasr@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:37:53 +0300 Subject: [PATCH 01/11] Update readme.md --- Foundations/Exam1/readme.md | 42 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Foundations/Exam1/readme.md b/Foundations/Exam1/readme.md index 778de05..e438ec5 100644 --- a/Foundations/Exam1/readme.md +++ b/Foundations/Exam1/readme.md @@ -1,9 +1,9 @@ -**Name:**\_\_\_\_\_\_\_\_\_ +**Name:** Bilal 1. **HTML**: Which HTML element is used to specify a title for a document? - - A. `` - - B. `` + - A. `<head>` + **- B. <title>** - C. `<header>` - D. `<meta>` @@ -11,12 +11,12 @@ - A. Creative Style Sheets - B. Cascading Style Scripts - - C. Cascading Style Sheets + **- C. Cascading Style Sheets** - D. Computer Style Sheets 3. **Git**: What command initializes a new Git repository? - - A. git init + **- A. git init** - B. git new - C. git start - D. git create @@ -25,13 +25,13 @@ - A. "10 > 9" - B. false - - C. true + **- C. true** - D. undefined 5. **HTML**: Which HTML element is used to create an unordered list? - A. `<ol>` - - B. `<ul>` + **- B. <ul>** - C. `<li>` - D. `<p>` @@ -39,7 +39,7 @@ - A. The opacity level of an element - B. The width and height of an element - - C. The stack order of an element + **- C. The stack order of an element** - D. The border thickness of an element 7. **Git**: How can you discard changes in the working directory in Git? @@ -58,14 +58,14 @@ 9. **HTML**: Which of the following tags is used to insert a blank line in HTML? - - A. `<br>` + **- A. <br>** - B. `<hr>` - C. `<line>` - D. `<break>` 10. **CSS**: Which CSS property is used to change the text color of an element? - - A. color + **- A. color** - B. text-color - C. font-color - D. textColor @@ -74,20 +74,20 @@ - A. git new branch - B. git branch new - - C. git branch <name> + **- C. git branch <name>** - D. git create <name> 12. **JavaScript**: How do you declare a JavaScript variable? - A. variable carName; - - B. var carName; + **- B. var carName;** - C. v carName; - D. declare carName; 13. **HTML**: Which doctype is correct for HTML5? - A. `<!DOCTYPE HTML PUBLIC>` - - B. `<!DOCTYPE HTML>` + **- B. <!DOCTYPE HTML>** - C. `<!DOCTYPE>` - D. `<!HTML>` @@ -96,19 +96,19 @@ - A. demo - B. .demo - C. \*demo - - D. #demo + **- D. #demo** 15. **Git**: What is the purpose of the `git push` command? - A. To fetch from and integrate with another repository - - B. To record changes to the repository + **- B. To record changes to the repository** - C. To update remote refs along with associated objects - D. To list all new or modified files to be committed 16. **JavaScript**: What is the correct JavaScript syntax to change the content of the HTML element below? `<p id="demo">This is a demonstration.</p>` - A. document.getElement("p").innerHTML = "Hello World!"; - - B. document.getElementById("demo").innerHTML = "Hello - World!" + **- B. document.getElementById("demo").innerHTML = "Hello - World!"** - C. #demo.innerHTML = "Hello World!"; - D. p.demo.innerHTML = "Hello World!"; @@ -116,19 +116,19 @@ - A. `<checkbox>` - B. `<check>` - - C. `<input type="checkbox">` + **- C. `<input type="checkbox">`** - D. `<input type="check">` 18. **CSS**: Which property is used to change the background color? - A. color - B. bg-color - - C. background-color + **- C. background-color** - D. bgcolor 19. **Git**: What does `git clone` do? - - A. Clones your local repository + **- A. Clones your local repository** - B. Clones a remote repository to your local machine - C. Copies a branch - D. Copies a commit @@ -138,7 +138,7 @@ - A. A local variable for function - B. A global variable for function - C. A block of code - - D. An inner function that has access to the outer (enclosing) function's variables—scope chain. + **- D. An inner function that has access to the outer (enclosing) function's variables—scope chain.** 21. **HTML**: Your task is to build a basic HTML structure for a blog article page. The page should have a header with the blog name, a main section, and a footer. The main section should include an article with a title, author name, published date, and the content of the article. Also include a section for comments. Each comment should display the commenter's name, comment date, and the comment itself. @@ -167,4 +167,4 @@ 29. **Git**: Write the Git command to check the status of your repository. -30. In your own words, define what "boilerplate code" means \ No newline at end of file +30. In your own words, define what "boilerplate code" means From 78c5c04e9b81d090e251ecc3f24a6b74850f9633 Mon Sep 17 00:00:00 2001 From: bilal-nasr <80160978+bilal-nasr@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:40:11 +0300 Subject: [PATCH 02/11] Update readme.md --- Foundations/Exam1/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Foundations/Exam1/readme.md b/Foundations/Exam1/readme.md index e438ec5..e2037f0 100644 --- a/Foundations/Exam1/readme.md +++ b/Foundations/Exam1/readme.md @@ -3,7 +3,7 @@ 1. **HTML**: Which HTML element is used to specify a title for a document? - A. `<head>` - **- B. <title>** + **- B. `<title>`** - C. `<header>` - D. `<meta>` @@ -31,7 +31,7 @@ 5. **HTML**: Which HTML element is used to create an unordered list? - A. `<ol>` - **- B. <ul>** + **- B. `<ul>`** - C. `<li>` - D. `<p>` @@ -58,7 +58,7 @@ 9. **HTML**: Which of the following tags is used to insert a blank line in HTML? - **- A. <br>** + **- A. `<br>`** - B. `<hr>` - C. `<line>` - D. `<break>` @@ -87,7 +87,7 @@ 13. **HTML**: Which doctype is correct for HTML5? - A. `<!DOCTYPE HTML PUBLIC>` - **- B. <!DOCTYPE HTML>** + **- B. `<!DOCTYPE HTML>`** - C. `<!DOCTYPE>` - D. `<!HTML>` From 71dd56e7d2bd41f9b03aa165403fa6e484d5358d Mon Sep 17 00:00:00 2001 From: bilal-nasr <80160978+bilal-nasr@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:08:06 +0300 Subject: [PATCH 03/11] Update readme.md --- Foundations/Exam1/readme.md | 199 ++++++++++++++++++++++++++++++------ 1 file changed, 170 insertions(+), 29 deletions(-) diff --git a/Foundations/Exam1/readme.md b/Foundations/Exam1/readme.md index e2037f0..a13bcee 100644 --- a/Foundations/Exam1/readme.md +++ b/Foundations/Exam1/readme.md @@ -2,7 +2,7 @@ 1. **HTML**: Which HTML element is used to specify a title for a document? - - A. `<head>` + - A. `<head>` <br> **- B. `<title>`** - C. `<header>` - D. `<meta>` @@ -10,13 +10,13 @@ 2. **CSS**: What does CSS stand for? - A. Creative Style Sheets - - B. Cascading Style Scripts + - B. Cascading Style Scripts<br> **- C. Cascading Style Sheets** - D. Computer Style Sheets 3. **Git**: What command initializes a new Git repository? - **- A. git init** + **- A. git init**<br> - B. git new - C. git start - D. git create @@ -24,13 +24,13 @@ 4. **JavaScript**: What will the following code return: Boolean(10 > 9)? - A. "10 > 9" - - B. false + - B. false<br> **- C. true** - D. undefined 5. **HTML**: Which HTML element is used to create an unordered list? - - A. `<ol>` + - A. `<ol>`<br> **- B. `<ul>`** - C. `<li>` - D. `<p>` @@ -38,13 +38,13 @@ 6. **CSS**: What does the `z-index` property specify in CSS? - A. The opacity level of an element - - B. The width and height of an element + - B. The width and height of an element<br> **- C. The stack order of an element** - D. The border thickness of an element 7. **Git**: How can you discard changes in the working directory in Git? - - A. git checkout -- + **- A. git checkout --**<br> - B. git discard - C. git undo - D. git clean @@ -53,19 +53,19 @@ - A. String - B. Boolean - - C. Function - - D. Character + - C. Function<br> + **- D. Character**<br> 9. **HTML**: Which of the following tags is used to insert a blank line in HTML? - **- A. `<br>`** + **- A. `<br>`**<br> - B. `<hr>` - C. `<line>` - D. `<break>` 10. **CSS**: Which CSS property is used to change the text color of an element? - **- A. color** + **- A. color**<br> - B. text-color - C. font-color - D. textColor @@ -73,20 +73,20 @@ 11. **Git**: How do you create a new branch in Git? - A. git new branch - - B. git branch new + - B. git branch new<br> **- C. git branch <name>** - D. git create <name> 12. **JavaScript**: How do you declare a JavaScript variable? - - A. variable carName; + - A. variable carName;<br> **- B. var carName;** - C. v carName; - D. declare carName; 13. **HTML**: Which doctype is correct for HTML5? - - A. `<!DOCTYPE HTML PUBLIC>` + - A. `<!DOCTYPE HTML PUBLIC>`<br> **- B. `<!DOCTYPE HTML>`** - C. `<!DOCTYPE>` - D. `<!HTML>` @@ -95,7 +95,7 @@ - A. demo - B. .demo - - C. \*demo + - C. \*demo<br> **- D. #demo** 15. **Git**: What is the purpose of the `git push` command? @@ -142,29 +142,170 @@ 21. **HTML**: Your task is to build a basic HTML structure for a blog article page. The page should have a header with the blog name, a main section, and a footer. The main section should include an article with a title, author name, published date, and the content of the article. Also include a section for comments. Each comment should display the commenter's name, comment date, and the comment itself. - -22. **HTML**: +``` +<!DOCTYPE html> +<html lang="en"> +<head> + <title>Blog + + +
+

Blog Name

+
+ +
+
+

Article Title

+

Author:

+

Published Date:

+

Article content.

+
+ +
+

Comments

+ +
+

Commenter:

+

Comment Date:

+

Comment content

+
+ +
+

Commenter:

+

Comment Date:

+

Comment content.

+
+
+ +
+ + + + +``` + +23. **HTML**: Create a simple HTML table that has 3 rows and 2 columns. The first row should be the table header. Also, write CSS to make the table expand to the full width of its parent element and each cell should have a border. - -23. **CSS**: + +``` + + + + Simple HTML Table + + + + + + + + + + + + + + + + + + + + +
Header 1Header 2
Row 1, Cell 1Row 1, Cell 2
Row 2, Cell 1Row 2, Cell 2
Row 3, Cell 1Row 3, Cell 2
+ + +``` + +25. **CSS**: Write a CSS rule that changes the font color to blue for any paragraph that is a direct child of a div element. +``` +div > p { + color: blue; +} +``` -24. **CSS**: +27. **CSS**: Given the HTML structure for the blog from the previous question, use CSS to style it. The blog title should be centered and have a different color than the rest of the text. The article title should be bold and underlined. The comments section should have a different background color than the rest of the page. -25. **Javascript**: - Write a JavaScript function that takes an array of numbers as an argument and returns the sum of all the numbers in the array. Test the function with an array of your choice. +``` + +``` +29. **Javascript**: + Write a JavaScript function that takes an array of numbers as an argument and returns the sum of all the numbers in the array. Test the function with an array of your choice. +``` +let sumArray = (arr){ + let sum = 0; + for(var i = 0; i { + let myList = document.getElementById("myList"); + let newItem = document.createElement("li"); + newItem.textContent = itemText; + myList.appendChild(newItem); +} +``` + +33. **Git**: Write the Git command to clone a repository from GitHub -29. **Git**: +``` +git clone +``` + +35. **Git**: Write the Git command to check the status of your repository. +`git status` + +37. In your own words, define what "boilerplate code" means -30. In your own words, define what "boilerplate code" means From 884d082921c0e917ea72f5bc6296420a5a51fbd7 Mon Sep 17 00:00:00 2001 From: bilal-nasr <80160978+bilal-nasr@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:14:05 +0300 Subject: [PATCH 04/11] Update readme.md --- Foundations/Exam1/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Foundations/Exam1/readme.md b/Foundations/Exam1/readme.md index a13bcee..92a96c3 100644 --- a/Foundations/Exam1/readme.md +++ b/Foundations/Exam1/readme.md @@ -308,4 +308,4 @@ git clone `git status` 37. In your own words, define what "boilerplate code" means - +boilerplate is a code that is rendered in the browser where we can call it more than one time and use it. This code can be modified a litlle when called. From ef2ea42bc86fa0e02f7eab1e490122f95d0b4dde Mon Sep 17 00:00:00 2001 From: bilal-nasr <80160978+bilal-nasr@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:16:52 +0300 Subject: [PATCH 05/11] Update readme.md --- Foundations/Exam1/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Foundations/Exam1/readme.md b/Foundations/Exam1/readme.md index 92a96c3..3dc8b85 100644 --- a/Foundations/Exam1/readme.md +++ b/Foundations/Exam1/readme.md @@ -307,5 +307,5 @@ git clone Write the Git command to check the status of your repository. `git status` -37. In your own words, define what "boilerplate code" means +37. In your own words, define what "boilerplate code" means
boilerplate is a code that is rendered in the browser where we can call it more than one time and use it. This code can be modified a litlle when called. From 3e1c1eaa32b9a7d6a3b2425096d8d2c2ca9d8486 Mon Sep 17 00:00:00 2001 From: bilal-nasr <80160978+bilal-nasr@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:19:25 +0300 Subject: [PATCH 06/11] Update readme.md --- Foundations/Exam1/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Foundations/Exam1/readme.md b/Foundations/Exam1/readme.md index 3dc8b85..b85b432 100644 --- a/Foundations/Exam1/readme.md +++ b/Foundations/Exam1/readme.md @@ -1,4 +1,4 @@ -**Name:** Bilal +**Name:** Bilal Nasr 1. **HTML**: Which HTML element is used to specify a title for a document? From 3067c909ff8197b81b1fe6bdfc70ce25a5b7e309 Mon Sep 17 00:00:00 2001 From: bilal-nasr <80160978+bilal-nasr@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:30:01 +0300 Subject: [PATCH 07/11] Update readme.md --- Foundations/Exam1/readme.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Foundations/Exam1/readme.md b/Foundations/Exam1/readme.md index b85b432..66d4eda 100644 --- a/Foundations/Exam1/readme.md +++ b/Foundations/Exam1/readme.md @@ -142,7 +142,7 @@ 21. **HTML**: Your task is to build a basic HTML structure for a blog article page. The page should have a header with the blog name, a main section, and a footer. The main section should include an article with a title, author name, published date, and the content of the article. Also include a section for comments. Each comment should display the commenter's name, comment date, and the comment itself. -``` +```HTML @@ -189,7 +189,7 @@ 23. **HTML**: Create a simple HTML table that has 3 rows and 2 columns. The first row should be the table header. Also, write CSS to make the table expand to the full width of its parent element and each cell should have a border. -``` +```HTML @@ -230,7 +230,7 @@ 25. **CSS**: Write a CSS rule that changes the font color to blue for any paragraph that is a direct child of a div element. -``` +```CSS div > p { color: blue; } @@ -239,7 +239,7 @@ div > p { 27. **CSS**: Given the HTML structure for the blog from the previous question, use CSS to style it. The blog title should be centered and have a different color than the rest of the text. The article title should be bold and underlined. The comments section should have a different background color than the rest of the page. -``` +```CSS ``` + 29. **Javascript**: Write a JavaScript function that takes an array of numbers as an argument and returns the sum of all the numbers in the array. Test the function with an array of your choice. -``` +```javascript let sumArray = (arr){ let sum = 0; for(var i = 0; i { let myList = document.getElementById("myList"); let newItem = document.createElement("li"); From 7b7a8207502e4b626bd7889c418eeadadcfba8bc Mon Sep 17 00:00:00 2001 From: bilal-nasr <80160978+bilal-nasr@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:32:15 +0300 Subject: [PATCH 08/11] Update readme.md --- Foundations/Exam1/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Foundations/Exam1/readme.md b/Foundations/Exam1/readme.md index 66d4eda..3c9b848 100644 --- a/Foundations/Exam1/readme.md +++ b/Foundations/Exam1/readme.md @@ -101,8 +101,8 @@ 15. **Git**: What is the purpose of the `git push` command? - A. To fetch from and integrate with another repository - **- B. To record changes to the repository** - - C. To update remote refs along with associated objects + - B. To record changes to the repository
+ **- C. To update remote refs along with associated objects** - D. To list all new or modified files to be committed 16. **JavaScript**: What is the correct JavaScript syntax to change the content of the HTML element below? `

This is a demonstration.

` From 256de27402dcd2fc1aed0b68500b7fd63dada5e4 Mon Sep 17 00:00:00 2001 From: bilal-nasr <80160978+bilal-nasr@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:33:29 +0300 Subject: [PATCH 09/11] Update readme.md --- Foundations/Exam1/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Foundations/Exam1/readme.md b/Foundations/Exam1/readme.md index 3c9b848..8654c2f 100644 --- a/Foundations/Exam1/readme.md +++ b/Foundations/Exam1/readme.md @@ -128,8 +128,8 @@ 19. **Git**: What does `git clone` do? - **- A. Clones your local repository** - - B. Clones a remote repository to your local machine + - A. Clones your local repository
+ **- B. Clones a remote repository to your local machine** - C. Copies a branch - D. Copies a commit From 8c43d2b9d770ebe454d83851569c5b807f6fe01f Mon Sep 17 00:00:00 2001 From: bilal-nasr <80160978+bilal-nasr@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:34:21 +0300 Subject: [PATCH 10/11] Update readme.md --- Foundations/Exam1/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Foundations/Exam1/readme.md b/Foundations/Exam1/readme.md index 8654c2f..ec8ccde 100644 --- a/Foundations/Exam1/readme.md +++ b/Foundations/Exam1/readme.md @@ -137,7 +137,7 @@ - A. A local variable for function - B. A global variable for function - - C. A block of code + - C. A block of code
**- D. An inner function that has access to the outer (enclosing) function's variables—scope chain.** 21. **HTML**: From 2d191db9d2a9619cd3b475206341f48a6b9f8e64 Mon Sep 17 00:00:00 2001 From: bilal-nasr <80160978+bilal-nasr@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:35:41 +0300 Subject: [PATCH 11/11] Update readme.md --- Foundations/Exam1/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Foundations/Exam1/readme.md b/Foundations/Exam1/readme.md index ec8ccde..be1998a 100644 --- a/Foundations/Exam1/readme.md +++ b/Foundations/Exam1/readme.md @@ -311,4 +311,4 @@ git clone `git status` 37. In your own words, define what "boilerplate code" means
-boilerplate is a code that is rendered in the browser where we can call it more than one time and use it. This code can be modified a litlle when called. +```boilerplate is a code that is rendered in the browser where we can call it more than one time and use it. This code can be modified a litlle when called.```