Question

Create a Python program using a list. You are the owner of a cheese shop, "The...

Create a Python program using a list.

You are the owner of a cheese shop, "The Deceased Macaw" and a customer has arrived. Write a program to greet them. You should first ask if the customer is interested in cheddar, if so, then they are given cheddar. Otherwise, you say that you'll find something. If they say that they don't want cheese, you ask them why they are in a cheese shop? In this exercise, valid user responses are "yes" "Yes" "no" and "No". Any other response is met with "I don't know what you're talking about." You are not permitted to use and in this assignment.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

# do comment if any problem arises

# code

# list to reply to customer inquiries

reply=[]

# adding replies to list

reply.append('Very well, here you are.')

reply.append('Oh, then I suppose we will locate another reasonably cheesy comestible.')

reply.append("Well, I don't know what you're doing in a cheese shop then.")

reply.append("I don't know what you're talking about.")

cheese = input('Do you like cheese? ')

# if buyer wants cheese

if cheese == 'yes' or cheese == 'Yes':

    cheddar = input('Is cheddar ok? ')

    # if buyer wants cheddar

    if cheddar == 'Yes' or cheddar == 'yes':

        print(reply[0])

    # if buyer doesn't wants cheese

    elif cheddar == 'no' or cheddar == 'No':

        print(reply[1])

    else:

        print(reply[3])

    # if buyer doesn't wants cheddar

elif cheese == 'no' or cheese == 'No':

    print(reply[2])

else:

    print(reply[3])

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Create a Python program using a list. You are the owner of a cheese shop, "The...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • (Python) Suppose you are a bike shop owner who put together bikes free spare parts. Your...

    (Python) Suppose you are a bike shop owner who put together bikes free spare parts. Your customers come to you with parts they've legitimately) found in their pares, from scrap metalhes, ceand they ask you to build them all the bikes you can make with the parts they give you You build the bikes, charge them a big pile of money for the privilege, and keep the leftover parts for yourself It takes the following parts to create one bicycle...

  • **** CREATE A PROGRAM USING PYTHON **** You have two apple trees in your backyard. You...

    **** CREATE A PROGRAM USING PYTHON **** You have two apple trees in your backyard. You want to create a program that will display a graph of how many apples your trees have lost in one day. Trees lose apples based on two factors: has the tree turned color yet and is it windy. If it is windy and the tree has turned color then your tree will lose 10 apples every 6 hours. If it is windy and your...

  • Using C++ Mr. Manager wants you to process orders for the Fast Greasy Food Shop. His...

    Using C++ Mr. Manager wants you to process orders for the Fast Greasy Food Shop. His customers have a few choices in what they order. The can order a hamburger for 1.00. It they want cheese it is an addition .50 and if they want bacon the additional amount is .75. They can also order a small or large drink for 1.10 and 1.60 respectively and small or large French fries for 1.20 or 1.75 respectively.    The user can only...

  • Create a program that keeps telling the user a joke. Consecutive jokes cannot be the same....

    Create a program that keeps telling the user a joke. Consecutive jokes cannot be the same. The joke must follow a question and answer format. For example: Computer: "What's the difference between a snowman and a snow-woman?" User: "Idk what?" Computer: "Snow Balls" The program must ask the user if they would like to keep going after each joke. And if the user says no the program should say goodbye and terminate. Otherwise, the program should continue on its next...

  • This program is in python. We are not allowed "exit()" In this part, you will write...

    This program is in python. We are not allowed "exit()" In this part, you will write a simple children's game. You will ask the user to enter five names of friends. Then, you will ask three questions 1. Which of these people would you give your last piece of candy?" 2. "With which of these people would you go on a 12 hour road trip?" 3. "With which of these people would you play tennis on a yacht? At the...

  • Lab 5 Instructions For Lab 5, you will be writing a more complex modular program that...

    Lab 5 Instructions For Lab 5, you will be writing a more complex modular program that uses at least two arrays, and has at least one loop that accesses the data in the arrays. As long as your program satisfies the requirements listed below, you are free to design and write any type of program that you care to. You are encouraged to be creative, and pick something that has meaning for you, because you'll have more fun. Feel free...

  • Please Use Python/IDLE language! Also, pleaseee include step by step algorithm. Python 3.4 Hawaiin Words program...

    Please Use Python/IDLE language! Also, pleaseee include step by step algorithm. Python 3.4 Hawaiin Words program help please. Hawaiian words can be intimidating to attempt to pronounce. Words like humuhumunukunukuapua'a look like someone may have fallen asleep on the keyboard. The language is actually very simple and only contains 12 characters; 5 vowels and 7 consonants. We are going to write a program that allows the user to enter a hawaiian word and give the pronunciation of the word or...

  • In Python!! 1. Correcting string errors It's easy to make errors when you're trying to type...

    In Python!! 1. Correcting string errors It's easy to make errors when you're trying to type strings quickly. Don't forget to use quotes! Without quotes, you'll get a name error. owner = DataCamp Use the same type of quotation mark. If you start with a single quote, and end with a double quote, you'll get a syntax error. fur_color = "blonde' Someone at the police station made an error when filling out the final lines of Bayes' Missing Puppy Report....

  • Instructions Basically, you will modify the mathq program to make it satisfy a different set of...

    Instructions Basically, you will modify the mathq program to make it satisfy a different set of requirements, and fix what is not working in it. Specifically, imagine that the client for whom we created the mathq program for would now like some changes. To be exact: Part 1: They want it to provide addition and subtraction problems as well as multiplication and division. They still want the choice to be random, as before, but now the problem is randomly multiplication,...

  • Using Python, Can someone please assist in the following: These are the hints: Summary This week's lab is to create a simple multiplication table using nested loops and if statements. Prompt the...

    Using Python, Can someone please assist in the following: These are the hints: Summary This week's lab is to create a simple multiplication table using nested loops and if statements. Prompt the user for the size of the multiplication table (from 2x2 to 10x10). Use a validation loop to display a warning if the number is less than 2 or greater than 10 and prompt the user to enter the data again until they enter a valid number Put a...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT