Write a function to create a simple home page with your name, your picture, and a table with the titles of your courses and teacher names.

What will be an ideal response?


```
def simpleHomePage(name, img, courses, teacherNames):
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 += "

I am taking the classes:

\n"
#Assumes courses and teacherNames are lists of same length
for index in range(0, len(courses)):
bodyText+= "

"+courses[index]+" with "+teacherNames[index]+"

\n"

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

Computer Science & Information Technology

You might also like to view...

Threat assessment, security requirements, and secure architecture are security practices that are applied at what business function level of the SAMM?

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Consider a ring topology network with 20 nodes. Each node in the network has neigh- bor degree 4. Apply the Watts-Strogatz rewiring strategy with rewiring probability p ? {0.02, 0.05, 0.1, 0.5, 1}. Calculate APL, ACC, and AND for each case. What are your observations on the resultant network structures with different p values?

What will be an ideal response?

Computer Science & Information Technology

Which one of the following lines names a constant needed in a program that computes the price per square inch of a round pizza?

a. scanf("%lf", &radius); b. pi = 3.14159; c. #define PI 3.14159 d. #include e. none of the above

Computer Science & Information Technology

In Alice, a turn(FORWARD, ...) or turn(BACKWARD, ...) message changes an object’s pitch.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology