# Greeter2 Example # Source code file: terminal/greeter2.py # Input: name, color, and background color # Output: HTML code containing a greeting. # Use the color and background color that was input. # Pseudocode: # Input name. # Input foreground color. # Input background color. # Input font family. # Input font size. # Open output HTML file. # Output header: use "Greeter2 Example" as title in header. # Output body: display name in output HTML file using # the input information. # Begin script # Input information for web page. name = input("Enter a name: ") color = input("Enter color: ") background_color = input("Enter background color: ") font_family = input("Enter font family: ") font_size = input("Enter font size in percent: ") # Open output file. fout = open("greeting.htm", "w") # Output web page. fout.write("\n") fout.write("\n") fout.write("\n") fout.write("Greeter2 Example\n") fout.write("\n") fout.write("\n") fout.write("\n") fout.write("\n") fout.write("

Greeter2 Example

\n") fout.write("

Hello, " + name + ", how are you?

\n") fout.write("\n") fout.write("\n") fout.write("\n") # Close output file fout.close( )