关键词 > COMPSCI111/111G

COMPSCI 111/111G An Introduction to Practical Computing 2021

发布时间:2022-09-09

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

COMPSCI 111/111G

SUMMER SEMESTER 2021

COMPUTER SCIENCE

An Introduction to Practical Computing

Test – Sample Answers

SECTION A  SHORT ANSWERS

Answer all questions in the space provided in the Word answer booklet.

Note:  The following specifications for a desktop computer are to be used to answer Questions 1(a) and 1(b):

Intel Core i7- 1165G7 4 Core 4.7 GHz

Windows 10 Pro

32 GB DDR4 RAM

NVIDIA GeForce GTX1070 8GB GDDR5

4 TB SATA3 HDD

480 GB SSD

Q1(a)  [3 marks]

What type(s) of secondary memory does the computer described above have?

HDD and SSD

Q1(b)  [3 marks]

Does this computer have a graphics card?  If yes, what kind?

Yes, the graphic card is a NVIDIA GeForce GTX1070 8GB GDDR5.

Q2  [4 marks]

What type of Internet protocol should your program use if you want to transfer data reliably, without time constraint?  Which one should be used if you favour time efficiency over          reliability?

Reliable transfer: TCP/IP.

Fast transfer: UDP.

Q3  [4 marks]

Describe two issues that people should be aware of and careful of with regards to emails and online forums.

Several possible answers: For example: Attachments (may contain malicious content), Misrepresentation (phishing, false profile, scams), Inappropriate behaviour (rudeness, disrespect).

Q4  [5 marks]

Explain what vandalism means in the context of Wikipedia.  List three ways of addressing Wikipedia vandalism.

Wikipedia vandalism = attack on a wiki page by editing the content to deliberately obstruct or defeat the page’s meaning.

Several ways of addressing it, e.g.: Automatic bots, recent change patrols, watchlists, reporting to Wikipedia admins.

Q5  [5 marks]

In 1993, why did Tim Berners-Lee convince CERN to make the source code for the World Wide Web (web servers and web browsers) freely available to the public?

He wanted to increase public use of the WWW, which would expand and develop on existing web content. Making the tools free would increase public participation much more than if      there was a proprietary licence.

Q6  [5 marks]

Imagine that it was mandatory for all websites to abide by Do Not Track” requests, and that everyone used a browser with this option switched on.  What impact would this likely have   on filter bubbles?  Why?

In this case, there would be no collection of personalised information. As everyone is              effectively anonymous, there would be no personalisation by website algorithms and this may prevent filter bubbles from forming.

Q7  [6 marks]

What is the ASCII code for the word Antidote”?

65 110 116 105 100 111 116 101

Q8(a)  [4 marks]

I created the following simple algorithm:

Input: User query.

If user asks what time it is,

Then display the time on the screen.

End.

Can I consider this algorithm to be a Machine Learning algorithm?  Briefly explain your

answer.

No because the algorithm is not learning anything to get better at the task. Its behaviour is explicitly programmed. (1 mark for No, 3 marks for explanation).

Q8(b)  [4 marks]

Give an example of how Machine Learning can be misused and explain briefly what is problematic in your example.

Several possible answers here. You can accept a general answer (e.g. spurious correlations,  misrepresentation in data, bad interpretation of the outcome, bad construction of the model), and also specific examples (Prediction of criminality based on facial features, Google Flu

Trends, Distinguishing Wolves from Huskies, Detecting pneumonia on MRI images). They can also give examples outside of the ones presented in the lecture.

Q9  [4 marks]

First, name one psychological issue that may arise from excessive technology (e.g. social     media) use.  Second, imagine that a friend of yours is experiencing this issue due to the way they use social media.  Briefly, what tips might you give them to help with this issue?

There are many options here. Mood disorder; distraction; diminishment of social skills. There also needs to be a plausible tip, preferably from the lecture.

Q10  [8 marks]

What is the result of the following binary calculation?  101112 - 1012

100102

Q11  [4 marks]

I am planning to create new software that enables users to configure a web server. The target users for my software want to be able to create complex new web server configurations very quickly. These users are experts who have past experience with web servers and who are        happy to spend the time up front learning how to issue tasks efficiently to the computer using my software, particularly if it means that they do complex web server configurations quickly. Should I create a command line interface or a graphical user interface to best support these    users?

I should create a command line interface. As the users are happy to spend time up front, they are open to learning the commands. As the users are experienced and want to create complex web server configurations quickly, they can most quickly achieve this using a command line interface.

Q12  [8 marks]

How many bytes are required for a 256 colour bitmap image 50 pixels wide and 40 pixels high?

256 colours requires 8 bits, which is one byte.

50 pixels times 40 pixels = 2000.

2000 pixels multiplied by 1 byte = 2,000 bytes.

SECTION B  Python and Spreadsheets

Q13 Python  [15 marks]

A bookstore is organising an online sale.  All books on the website are now $15 + 10% GST. If the total price is higher than $100, the shipping is free, else a $10 fee is added.

Write a Python program to calculate the total price, based on how many books are ordered. Your program will take the number of books bought as user input, and will output the final price, including GST and shipping.

Note:

i.       You must use variables for all values, including constant values.

ii.      You must name the variables meaningfully (e.g. gst, total_price,     shipping_fees, number_of_books).  Avoid single letter variable names.

Two examples of the program being run are given below.  Follow the formatting used in the examples for asking the user for values and printing the result.  User input is indicated in the examples with bold and italicized font.

Example 1:

Enter the number of books you want to buy: 2

Shipping fees = $ 10

The total cost for your order today is: $ 43.0

Example 2:

Enter the number of books you want to buy: 10

Free shipping

The total cost for your order today is: $ 165.0

gst = 0.10

unit_book_price = 15

num_of_books = int(input("Please enter the number of books ordered: "))

total_price = unit_book_price * number_of_books)

total_price = total_price + gst * total_price

if total_price > 100:

print("Free shipping")

else:

print("Shipping fees = $10")

total_price = total_price +10

print("The total cost for your order today is: $",

total_price,)

Q14 Spreadsheets  [18 marks]

Last summer, I went for a trip to the Yosemite National Park, USA, to do some rock climbing with friends.  There are several grading systems to evaluate how hard the rock-climbing         routes are. Two of the most used systems are the YDS (Yosemite Decimal System) and the    French System. I noted the YDS grade of the routes I have passed. I want to create a               spreadsheet to quickly translate the YDS grades into the French System so I can relate them   to what I am used to climbing in France.

 

(a)  [7 marks]  What formula, using the VLOOKUP function, should I use in F3 to obtain the French System grade corresponding to the YDS grade that I entered in E3?           Note: The formula must be able to be filled down from F3 to F7.

=VLOOKUP(E3,$A$3:$C$18,2,FALSE)

(b) [4 marks]  What function would I use if my data was transposed (i.e. organised horizontally instead of vertically)?

HLOOKUP

(c) [7 marks]  Hurrah, the formula works, and I got all the grades translated into the French System.  Here are the results:

 

My goal was to climb the equivalent of a “6c” in the French System.  Using an IF function, what formula should I use in Cell G3 to get a Yes/No answer about whether or not I reached my goal?  If I have reached my goal, display Yes”, else display No” .

Note: Your formula must be able to be filled down.

=IF(F3="6c","Yes","No")