Write a function to create a simple home page with your name, your picture, and your hometown. Provide a link to your home town in a search engine (like Google or Bing) and to a map of your home town (e.g., via Google Maps or Mapquest).

Note: Embedding a map from Google Maps or Mapquest of a home town will require an API key from one of those services. That APIKey could then be passed in to the function as well. For example, the below:


```
def simpleHomePage(name, img, hometown, hometownlink, maplink, apikey):
homePageFile=open("homepage.html","wt")
samplesFile.write(doctype())
samplesFile.write(title("Homepage")+"\n")
#Now, let's make up the string that will be the body
bodyText="

"+name+"

\n"
bodyText+= image(img)+"\n"
bodyText += "

My hometown is "+hometown+"

\n"
bodyText += '

You can learn more about it
here

\n'
bodyText += '"'
samplesFile.write(body(bodyText)+"\n")
samplesFile.close()
```

Note: Alternativey, an answer could simply include an image map of their hometown, which wouldn’t allow for interaction but wouldn’t require a key.

```
def simpleHomePage(name, img, hometown, hometownlink, map):
homePageFile=open("homepage.html","wt")
samplesFile.write(doctype())
samplesFile.write(title("Homepage")+"\n")
#Now, let's make up the string that will be the body
bodyText="

"+name+"

\n"
bodyText+= image(img)+"\n"
bodyText += "

My hometown is "+hometown+"

\n"
bodyText += '

You can learn more about it here

\n'
bodyText += "

And here's a map!

"
bodyText += ""+image(map)
samplesFile.write(body(bodyText)+"\n")
samplesFile.close()
```

Computer Science & Information Technology

You might also like to view...

Inkjet printers frequently have a built-in paper test to ensure the paper weight is enough to print the specified output, such as photos

Indicate whether the statement is true or false

Computer Science & Information Technology

In general, controlled approaches:

a. work better than contention approaches for small networks that have low usage b. work better than contention approaches for large networks that have high usage c. work better than contention approaches for all sizes of networks d. do not require a host, server, or active monitor to assign media access control e. have many collisions

Computer Science & Information Technology

The do while statement ends with what character?

A. comment B. semicolon C. colon D. ending brace

Computer Science & Information Technology

Discuss the main approaches for managing the design of a database system that has multiple user views.

What will be an ideal response?

Computer Science & Information Technology