Skip to content
Open
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
228 changes: 207 additions & 21 deletions Foundations/Exam1/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
1. **HTML**: Which HTML element is used to specify a title for a document?

- A. `<head>`
- B. `<title>`
**- B. `<title>`**
- C. `<header>`
- D. `<meta>`

2. **CSS**: What does CSS stand for?

- 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
Expand All @@ -25,26 +25,26 @@

- 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>`

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
- 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?

- A. git checkout --
**- A. git checkout --**
- B. git discard
- C. git undo
- D. git clean
Expand All @@ -54,40 +54,40 @@
- A. String
- B. Boolean
- C. Function
- D. Character
**- D. Character**

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
- B. text-color
**- B. text-color**
- C. font-color
- D. textColor

11. **Git**: How do you create a new branch in Git?

- 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>`

Expand All @@ -96,40 +96,40 @@
- 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
- C. To update remote refs along with associated objects
**- 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!";

17. **HTML**: What is the correct HTML for making a checkbox?

- 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
- B. Clones a remote repository to your local machine
**- B. Clones a remote repository to your local machine**
- C. Copies a branch
- D. Copies a commit

Expand All @@ -138,33 +138,219 @@
- 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.

<!DOCTYPE html>
<html>
<head>
<title>My Blog Article</title>
</head>
<body>
<header>
<h1>My Blog</h1>
</header>
<main>
<article>
<h2> Myth and monstrosity</h2>
<p>Derry, K. </p>
<p>2018</p>
<p>The past few times that I have taught my course on religion and film I have included a number of Indigenous movies. The response from students has been entirely positive, in part because most of them have rarely encountered Indigenous cultural products of any kind, especially contemporary ones. Students also respond well to the way in which many of these films use notions of the monstrous to explore, and explode, colonial myths. Goldstone, for example, by Kamilaroi filmmaker Ivan Sen, draws on noir tropes to peel back the smiling masks of the people responsible for the mining town’s success, revealing their underlying monstrosity. Similarly, Mi’gmaq Jeff Barnaby’s debut feature Rhymes for Young Ghouls makes cinematic allusions to 1970s horror films in its depiction of the residential school system. In this paper, I will draw on these examples to discuss how examination of the monstrous in Indigenous films can help us to introduce students to the ideological power of myth, specifically in relation to colonialism.</p>
</article>
<section>
<h3>Comments</h3>
<div>
<p>Commenter Name</p>
<p>Comment Date</p>
<p>content</p>
</div>
<div>
<p>Commenter Name</p>
<p>Comment Date</p>
<p>content</p>
</div>
</section>
</main>
<footer>
<p>© 2023 My Blog. All rights reserved.</p>
</footer>
</body>
</html>

22. **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.
<!DOCTYPE html>
<html>
<head>
<style>
table {
width: 100%;
border-collapse: collapse;
}

th, td {
border: 1px solid black;
padding: 8px;
}
</style>
</head>
<body>
<table>
<tr>
<th>th</th>
<th>th</th>
</tr>
<tr>
<td>td</td>
<td>td</td>
</tr>
<tr>
<td>td</td>
<td>td</td>
</tr>
<tr>
<td>td</td>
<td>td</td>
</tr>
</table>
</body>
</html>

23. **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**:
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.


<!DOCTYPE html>
<html>
<head>
<title>My Blog Article</title>
<style>
body {
font-family: Arial, sans-serif;
}

header {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}

h1 {
color: #ff4500;
}

article h2 {
font-weight: bold;
text-decoration: underline;
}

section.comments {
background-color: #f4f4f4;
padding: 10px;
}

div.comment {
background-color: #fff;
margin-bottom: 10px;
padding: 10px;
}

footer {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
</style>
</head>
<body>
<header>
<h1>My Blog</h1>
</header>
<main>
<article>
<h2>Myth and monstrosity</h2>
<p>Derry, K.</p>
<p>2018</p>
<p>The past few times that I have taught my course on religion and film I have included a number of Indigenous movies. The response from students has been entirely positive, in part because most of them have rarely encountered Indigenous cultural products of any kind, especially contemporary ones. Students also respond well to the way in which many of these films use notions of the monstrous to explore, and explode, colonial myths. Goldstone, for example, by Kamilaroi filmmaker Ivan Sen, draws on noir tropes to peel back the smiling masks of the people responsible for the mining town’s success, revealing their underlying monstrosity. Similarly, Mi’gmaq Jeff Barnaby’s debut feature Rhymes for Young Ghouls makes cinematic allusions to 1970s horror films in its depiction of the residential school system. In this paper, I will draw on these examples to discuss how examination of the monstrous in Indigenous films can help us to introduce students to the ideological power of myth, specifically in relation to colonialism.</p>
</article>
<section class="comments">
<h3>Comments</h3>
<div class="comment">
<p>Commenter Name</p>
<p>Comment Date</p>
<p>content</p>
</div>
<div class="comment">
<p>Commenter Name</p>
<p>Comment Date</p>
<p>content</p>
</div>
</section>
</main>
<footer>
<p>© 2023 My Blog. All rights reserved.</p>
</footer>
</body>
</html>


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.

function calculateSum(numbers) {
let sum = 0;
for (let i = 0; i < numbers.length; i++) {
sum += numbers[i];
}
return sum;
}

const numbers = [1, 2, 3, 4, 5];
const result = calculateSum(numbers);
console.log("Sum:", result);


26. **Javascript**:
Create a JavaScript object that represents a student. The object should have properties for name, age, and subjects. Subjects should be an array of strings

const student = {
name: "John Doe",
age: 20,
subjects: ["Math", "Science", "English"]
};

27. **Javascript**:
Write a JavaScript function that adds a new item to a list in the HTML document. Assume the list has an id of "myList".

function addItemToList(itemText) {
const list = document.getElementById("myList");
const newItem = document.createElement("li");
newItem.textContent = itemText;
list.appendChild(newItem);
}

28. **Git**:
Write the Git command to clone a repository from GitHub

git clone <repository-url>

29. **Git**:
Write the Git command to check the status of your repository.

30. In your own words, define what "boilerplate code" means
git status


30. In your own words, define what "boilerplate code" means

its a basic structure to build a task.