Question: I have a python project where i want to write a function named survey . The function takes in a file name as a parameter.

I have a python project where i want to

write a function named survey. The function takes in a file name as a parameter. The

function will ask three questions:

What is your favorite type of soft drink. The user must answer this or the

function will exit

What is your favorite brand of that soft drink? This response is not required. If

the user enters nothing, the value will be "NA"

The age of the person. It must be a valid number.

If all the information is entered correctly, the survey results are added to the file.

Each survey on its own line and each value separated by commas.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!