Extend the form-letter recipe to take an input of a pet’s name and type, and reference the pet in the form letter."Your pet "+petType+","+petName+" will love our offer!" might generate "Your pet poodle, Fifi, will love our offer!".
What will be an ideal response?
Note: The answer just needs to include one extra line with the suggested changes.
```
def formLetter(gender,lastName,city,eyeColor, petType, petName):
file = open("formLetter.txt","wt")
file.write("Dear ")
if gender=="F":
file.write("Ms. "+lastName+":\n")
if gender=="M":
file.write("Mr. "+lastName+":\n")
file.write("I am writing to remind you of the offer ")
file.write("that we sent to you last week. Everyone in ")
file.write(city+" knows what an exceptional offer this is!")
file.write("(Especially those with lovely eyes of"+eyeColor+"!)")
file.write("Your pet "+petType+", "+petName+" will love our offer!")
file.write("We hope to hear from you soon.\n")
file.write("Sincerely ,\n")
file.write("I.M. Acrook , Attorney at Law")
file.close()
```
You might also like to view...
A two dimension array can also be thought of as
a. a table b. an array of arrays c. a file d. none of the above e. A and C f. A and B
Once a maintainer receives approval for a modification from the CCB, a contract or __________ is written and presented to the body responsible for implementation.
Fill in the blank(s) with the appropriate word(s).
You create a macro in Access by entering a specific series of actions in the ____ window.
A. Design view B. Macro Design C. Macro/VBA D. Macro Builder
A bulkhead is a software program or hardware device that controls access between two networks.
Answer the following statement true (T) or false (F)