Question: 1 A. The program will ask each of the following questions and then display the answer. For example, it asks what is your name and

1 A. The program will ask each of the following questions and then display the answer. For example, it asks what is your name and it displays your name is Fred. Add more if you wish to be creative!

What is your name?

What is your conference ID?

Which organization do you represent?

What is your email address?

State any food preferences?

1B. The program will then prompt the user if they wish to attend the following sessions and, using conditionals, print back out confirmation of their attendance. For example, it asks "Do you wish to attend Python for beginners? (Y or N)" and the user enters Y, it displays "Ok, I've recorded your interest to attend Python for beginners." Similarly, if the user enters N, the program displays, "Ok, I've recorded your disinterest to attend Python for beginners." Feel free to be more creative!

Python for beginners

Database development with Python

Python for data science

Advanced Python for application developers

1C. The automated interviewer now serves its purpose from the perspective of the user of the program. But the number of questions and answers makes it a little messy to maintain. Copy your code into a new python file, consult the documentation on tuples and lists, and rewrite the program so that a simple change to the question tuple is all that is needed to record all the relevant answers.

1D. Redesign the program so that the list of questions is stored in a tuple so that all the questions are in one place and it becomes really easy to add one.

1E. But what about the answers? How can we record the answer to every question without making any changes to the program other than adding a new question (or removing an existing question) from the tuple?

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!