Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions

Question

What will you do to follow-up on this self-assessment?

Answered: 1 week ago

Question

The amount of work I am asked to do is reasonable.

Answered: 1 week ago

Question

The company encourages a balance between work and personal life.

Answered: 1 week ago