Sunteți pe pagina 1din 8

CS 170 – Exam 1

Additional Information and Sample Questions –


SOLUTIONS to selected problems
Date and Time
The exam will be held on October 7th,, 7:00am – October 8th, 7:00am. All work MUST BE COMPLETED
AND SUBMITTED BY 7:00am October 8th. You will have 90 total minutes to complete the exam.
Content
Material Covered in Exam 1:
Chapter 1 (Basic Concepts/Historical Overview), Chapter 2 (Human-Computer Interface), Chapter 3
(Networking), Chapter 4 (HTML), Chapter 5 (Search Engines), Chapters 7, 8 (Digitization of Text and
Multimedia), Chapter 9 (Computer Operations).
Learning Objectives Covered
To see a summary of learning Objectives that will be covered on the exam, go to the MODULES tool in
Canvas.
You should focus on everything that is in the Learning Objectives documents. The text problems and external
resources are all listed there.
Canvas CS 170 FALL 2020 → Modules → Readings and Resources by Weeks (Weeks 1 – 4).
Format
• The exam may include True/False questions, Multiple Choice questions, Short Answer questions, and longer
answer questions that require you to show all work (number conversions), interpretation of HTML coding (both
understanding the logic flow and writing HTML code).
• The exam is in TWO parts:
o Short Answer: 25 questions, 1 point each. 40 minutes
o Longer answers (programs, conversions, etc.): 25 points, problem point values vary. 50 minutes.
• You may take a break between part 1 (40 minutes) and part 2 (50 minutes). You may take the parts in either
order.
• All questions are randomly chosen from pools of available questions.
• You have only ONE attempt for each part.
• Questions will be given one at a time and will be locked after you submit your answer. You cannot go back to a
question and change the answer.

Other requirements
• You are on your honor to complete the exam.
• The exam is open notes, but you CANNOT consult with any person in completing the exam.
• You CANNOT use any on-line tutoring sites for assistance. Please READ Rutgers Academic Integrity
(AI) Policy. Videos explaining these policies are posted in Course Information Module in Canvas. ANY
incident of suspected violation of these policies WILL BE REPORTED to the University.
• If you know that one of your classmates has violated the AI policies, it is your responsibility to report
the incident to the course coordinator (fran.trees@cs.rutgers.edu ) or to your instructor, giving all of the

Page 1 of 8
details of the situation. Your report of the incident will be considered confidential. The instructor will
take the appropriate action and the incident will be investigated. Calculators, online
calculation/conversion tools are not to be utilized during the exam.
• If the problem indicates “SHOW ALL WORK” and you do not show your work, you will not receive
credit for the problem.

Sample Questions
These example questions below are intended to provide the student with a method to practice for the more
complicated problems on the actual exam. The problems are not intended to represent the limit of the material the
student is expected to know. The student is responsible for understanding all concepts covered in the
Learning Objectives listed and should be able to complete all assigned textbook problems. It is also assumed
that the student has studied all external resources listed in the documents described above.
Sample problems:
1. Complete the following table row by row. Use the appropriate processes and calculations to complete it. Show
your work below the table. For complete credit, show your work below the table.

Decimal Binary Hexadecimal

123 1111011 7B

51 110011 33

149 10010101 95

83 1010011 53

183 10110111 B7

173 10101101 AD

2. 3.2) a. Write the query that will retrieve the shaded area in the following diagram:

onions AND pineapple AND


ham
also acceptable:
onions pineapple ham
(since the AND is implied)

3. Write an alternative query which will find items including onion and either pineapple or ham.
onion AND (pineapple OR ham)

Page 2 of 8
onion (pineapple OR ham) AND is implied
(pineapple OR ham) onion
(pineapple OR ham) AND onion
Due to PEMAS these also work
Pineapple or Ham and Onion
Onion and Pineapple or Ham
4. Find and list six (6) syntax errors in the following HTML code. Also circle the location of those errors in the code
provided. Find and list six (6) syntax errors in the following HTML code. ONLY 1 ERROR PER LINE. Also circle the
location of those errors in the code provided. You can assume the HTML code above line 5 and below line 19 is
correct.

5 <head>
6 <-- This is a comment -->
7 <title This is the title of the page/>
8 <meta description=”This is the description of the webpage”/>
9 <style> body { background: red; } </style>
10 <head>
11 </body>
12 <h5> Welcome !!! </h6>
13 <div style color white>
14 <p
15 This is the story of a faulty web page
16 Click below to go to a yet another shady web page
17 <a href=”https://www.virus.net”><img href=”image.png” alt=”Image”/></a>
18 </div>
19 </body>

<head>
<-- This is a comment --> 1. Malformed comment, should be: <!-- This is a comment -->
<title This is the title of the page/> 2. Title tags should be: <title>This is the title of the page</title>
<meta description=”This is the description of the webpage”/>
<style> body { background: red; } </style>
<head> 3. Closing head tag should be: </head>

</body>
<h7> Welcome !!! </h6> 4. h7 does not exists, 5. tags don’t match
<div style color white> 6. inline style should be: <div style=”color:white;”>
<p>
This is the story of a faulty web page
Click below to go to a yet another shady web page
<a href=”https://www.virus.net”><img href=”image.png” alt=”Image”/></a>
7. img uses src, not href
8. <p> tag missing its ending tag </p>

</div>
</body>

Page 3 of 8
5. Write the <body> section of an HTML5 program that reproduces the web page shown below. The image,
“crackers.jpg”, is local and in the same folder as the HTML file you are creating. You must use the most
appropriate tags and styling in your program. You are NOT coding the black border.

<h1>The Bland Diner</h1>


<p><img src="crackers.jpg" alt="Crackers"></p>
<h2>Salads - $36</h2>
<ul>
<li>Just Lettuce</li>
<ol>
<li> vingar dressing </li>
<li> salt dressing </li>
</ol>
<li>Lettuce with Crackers</li>
<li>Chickenless Teriyaki</li>
</ul>
<h2>Contact - we deliver!</h2>
<ul>
<li>Phone: 555-555-5555</li>
<li>Email: some@email.com</li>
</ul>

6. Explain the difference between LOSSY compression and LOSSLESS compression.


Lossy compression schemes will discard data therefore loosing bits of the original information. Lossless
compression schemes make possible the full recovery of the original information.

7. Give one benefit of using HEXADECIMAL number representation over BINARY number representation.

Answer can be found on Page 189 in your text

8. Explain how Google’s PageRank works.


Answer can be found on Page 122 in your text
Page 4 of 8
9. Referring to color representation as RGB triplets: Describe how to change

a. The BRIGHTNESS of a photo. Page 216-217, 219


b. The CONTRAST of a photo Page 215, 219
c. The INTENSITY of a color. Page 213

10. Give RGB values for the following colors: (https://www.rapidtables.com/web/color/RGB_Color.html )


a. BLACK (0,0,0)
b. WHITE (255,255,255)
c. A dark shade of gray (100,100,100)
d. A dark shade of blue (0,0,128)
e. RED (255,0,0)

11. Describe how analog sound is digitized.

Answer can be found on Page 220-222 in your text

12. Write HTML code to result in the tables below:

<!DOCTYPE html>
<html>
<head>
<meta charset = "UTF-8" />
<title> Tables </title>

Page 5 of 8
<style>
table, th, td {
width: 50%;
border: 2px solid black;
font-size: 30px;
}
</style>
</head>

<body>
<table>
<caption> <b> Bilingual Countries </b></caption>
<tr>
<th> Country </th>
<th colspan = "2"> Languages </th>
</tr>
<tr>
<td >Canada</td>
<td> French</td>
<td> English</td>
</tr>
<tr>
<td> Belgium </td>
<td> Dutch </td>
<td> French </td>
</tr>
</table>
</body>
</html>

Page 6 of 8
<!DOCTYPE html>
<html>
<head>
<meta charset = "UTF-8" />
<title> Tables </title>
<style>
body { background-color: bisque; color:brown}
p {text-align: center;}
table, th, td {
width: 75%;
font-size: 20px;
text-align: center;

}
caption {
padding: 30px;
font-size: 30px;
}
/* Do not worry about getting this box around the table */
table {
border: 2px solid brown;
display: inline-block;
}
</style>
</head>

<body>
<p>
<table >
<caption > <b> HTML Table </b></caption>
<tr>
<th colspan = "3" > Company Information </th>
</tr>
<tr>
<th> Company </th>
<th> Contact </th>
<th> Country </th>
</tr>
<tr>
<td >Alfreds Futterkiste</td>
<td> Maria Anders</td>
<td> Germany</td>

Page 7 of 8
</tr>
<tr>
<td> Centro comercial Moctezuma </td>
<td> Francisco Chang </td>
<td> Mexico </td>
</tr>
</table>
</p>
</body>
</html>

Page 8 of 8

S-ar putea să vă placă și