The makeSamplePage function generates all of the HTML on one line. Inserting the character \n will generate new lines. Put in some newline characters into a new version of that function to create readable HTML. Call it makeReadableSamplePage.
What will be an ideal response?
```
import os
def makeSamplePage(directory):
samplesFile=open(directory+"/samples.html","wt")
samplesFile.write(doctype())
samplesFile.write(title("Samples from "+directory)+"\n")
#Now, let's make up the string that will be the body
samples="
Samples from "+directory+"
\n"for file in os.listdir(directory):
if file.endswith(".jpg"):
samples=samples+"
Filename: "+file
samples=samples+'
samplesFile.write(body(samples)+"\n")
samplesFile.close()
```
You might also like to view...
The Chart Tools contextual tabs are ________
A) Design, Format, and Edit Chart B) Design and Format C) Layout and Design D) Design, Layout, and Format
The results of running an update query can be reversed using the Undo button
Indicate whether the statement is true or false
What is the main weakness associated with the use of passwords
a. brute force b. rainbow tables c. human memory d. dwell time
The ________ function returns a value of TRUE if ALL of the tested conditions are met
Fill in the blank(s) with correct word