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
bodyText += ' src='+maplink+'&key='+apikey+'">"'
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()
```
You might also like to view...
Case 7-1Lila is writing a program that includes Boolean expressions.The expression p | | (q && r) is equal to ____.
A. | | p && | | q B. (p | | q) && (p | | r) C. p | | q && p | | r D. p | | q| | r
Advertising is not a good way to bring awareness to social issues.
Answer the following statement true (T) or false (F)