GS 510 Homework (due Sep 18) 2) A. Hulpke

advertisement

GS 510 Homework (due Sep 18) A. Hulpke

2) An HTML page is a text file that contains links in the following format:

<A HREF=" location "> link text </A>

Write a shell skript that takes an HTML page as input and produces a list of all links in the form link text : location

Try this script on the page of course web links. You can get a text source of this page by the command (single line): lynx -source "http://www.math.colostate.edu/˜hulpke/lectures/ gs510/hpclinks.html" > testpage.html

Hand in (by mailing me a tar archive with the files) your program as well as a file containing the output for the course links.

3) What would be good programming languages to chose for the following tasks? Justify your choices.

a) A Windows graphics program.

b) The statical analysis of a bridge construction.

c) The machinery of a web store.

d) A Linux driver for a wireless ethernet card.

e) A climate model.

f) Teaching introductory programming.

g) A program to send you (from a stored list) reminder emails about your friend’s birthdays.

h) A compiler for a programming language.

i) A bank’s bookkeeping.

j) The controls of a nuclear power plant.

4) Let x ∈ [ − 10 ..

10] . We want to evaluate f ( x ) = exp( x

2

+ 3 ∗ x + 1) . What accuracy for x do we need to have to guarantee that f ( x ) has an (absolute) error of at most 10

− 10 , assuming we would be able to calculate with exact numbers?

Download