Look Out, Jeff Bezos
Due Friday, April 9 @ 6pm
In this assignment, you will create The Jungle, a new online shopping site that will lay waste to Amazon. At its inception, Jungle will offer the following kinds of products:
The Jungle is still lining up its suppliers, so its stock is limited. In fact, you can read all the items The Jungle carries from the file jungle_items.txt, a tab-delimited file. The file describes each item, one item per row that is formatted like this
category name_of_item cost
To buy things from The Jungle, a shopper will select the item by number from a list. The item will then be placed in the shopper’s cart. The shopper can check their cart at any time and remove an item or even clear the cart’s contents. When they are done, the shopper can pay and exit.
This is how your solution will be graded:
Points | Requirement |
1 | Begins with an attractive, centered heading |
2 | Presents a menu of options and gets the users selection using a function called print_menu_and_get_choice |
2 | Repeats until the user decides to quit. |
5 | Reads the items from the file jungle_items.txt and loads them into lists. |
5 | Presents the list of items to the user, formatted as shown, and allows the user to select an item, using a function called print_items_and_get_choice. |
5 | When the user selects an item, it and its associated cost is added to their cart. |
3 | Shows the items in their cart, formatted as shown, when the user chooses item 2. It shows the message “Your cart is empty.” when there are no items in the cart. |
5 | Allows the user to remove a specific item or to clear all the items in their cart. |
5 | Shows the user the items in their cart and their total cost as formatted in the example when the user chooses option 4, and then exits the program |
1 | You add helpful comments to your program, particularly before functions to explain what they do. |
1 | You submit your program as jungle_lastname.py, where you replace “lastname” with your last name. |
You will earn -35 out of 35 if you copy any part of your code from someone or something else, or allow others to copy from you.
There will be a 10 point penalty if your program crashes.
Here is sample output on how The Jungle will work.
———————————————————————-
WELCOME TO THE JUNGLE
We’ve Got Fun and Games
———————————————————————-
What would you like to do?
Enter the number of your choice: 2
Your cart is empty.
What would you like to do?
Enter the number of your choice: 1
What would you like to purchase?
Enter number of choice: 11
The item has been added to your cart.
What would you like to do?
Enter the number of your choice: 1
What would you like to purchase?
Enter number of choice: 17
The item has been added to your cart.
What would you like to do?
Enter the number of your choice: 2
Here are the items in your cart:
Gold Ring $399.49
Leather Belt $ 24.99
What would you like to do?
Enter the number of your choice: 3
Here are the items in your cart:
Enter the number of the item to remove, or ‘a’ to clear all items: 2
The item has been removed.
What would you like to do?
Enter the number of your choice: 2
Here are the items in your cart:
Gold Ring $399.49
What would you like to do?
Enter the number of your choice: 1
What would you like to purchase?
Enter number of choice: 24
The item has been added to your cart.
What would you like to do?
Enter the number of your choice: 1
What would you like to purchase?
Enter number of choice: 21
The item has been added to your cart.
What would you like to do?
Enter the number of your choice: 2
Here are the items in your cart:
Gold Ring $399.49
Screw Driver $ 9.99
Flip Flops $ 15.99
What would you like to do?
Enter the number of your choice: 3
Here are the items in your cart:
Enter the number of the item to remove, or ‘a’ to clear all items: a
Are you sure you want to remove all items (y/n)? y
Your cart has been emptied.
What would you like to do?
Enter the number of your choice: 2
Your cart is empty.
What would you like to do?
Enter the number of your choice: 1
What would you like to purchase?
Enter number of choice: 25
The item has been added to your cart.
What would you like to do?
Enter the number of your choice: 1
What would you like to purchase?
Enter number of choice: 23
The item has been added to your cart.
What would you like to do?
Enter the number of your choice: 1
What would you like to purchase?
Enter number of choice: 9
The item has been added to your cart.
What would you like to do?
Enter the number of your choice: 2
Here are the items in your cart:
Saw $ 23.99
Fedora $ 22.99
Xbox One X $449.95
What would you like to do?
Enter the number of your choice: 4
Here is what you purchased:
Saw $ 23.99
Fedora $ 22.99
Xbox One X $449.95
Total cost: $496.93
Thank you for shopping at The Jungle!
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more