Write a study on the topic, “Is Python coding a good option for beginners?”
February 29, 2024 Comments Off on Write a study on the topic, “Is Python coding a good option for beginners?” Do My assignment Assignment-help
Words: 447
Pages: 2
Subject: Do My assignment

Write a study on the topic, “Is Python coding a good option for beginners?”
— Review the grading rubric posted under Course Information, Programming Resources.
— Use the programming template posted under Course Information, Programming Resources.
Scenario:
You decide to open a produce stand. Since produce prices vary week-to-week, you want a Python program where you can look up
the current produce prices. Maybe in the future, you can read the weekly produce prices into the program, but for now
you code a dictionary with produce key-value pairs in your program.
Specifications:
Write a Python program —
1. That uses a dictionary of produce prices (provided below).
2. The program will print all items in the dictionary in five columns, where each column has a width of 15 characters.
3. The program will continously (hint infinite loop) ask the user to enter a specific product to look up or a ‘q’ to quit.
4. If the user enters a ‘q’, the program will terminate and thank the user for using the program.
5. If the user enters a product not in the dictionary, the program will print the product can’t be found.
6. If the user enters a product in the dictionary, the program prints the product name and price per pound.
7. Be sure to strip white space from the user’s entry and convert the entry to lowercase.
8. Add a docstring with the program’s description and a docstring describing the function.
9. Add comments where/when needed.
10. Make the program’s run time and display look like the following example runs.
11. Name your program using your name and programming exercise 6, for example jrlane_exercise6.py
12. Submit your completed assignment as Programming Exercise 6 through Blackboard.
Provided code:
produce = {
“apples” : 2.31,
“asparagus” : 4.79,
“avocados” : 2.39,
“bananas” : 0.98,
“beans” : 2.64,
“beets” : 2.11,
“broccoli” : 2.41,
“cabbage” : 1.19,
“carrots” : 2.31,
“celery” : 1.75,
“cucumbers” : 2.11,
“eggplant” : 2.35,
“garlic” : 4.04,
“grapefruit” : 1.03,
“lemons” : 1.67,
“limes” : 2.53,
“cantaloupes” : 1.03,
“mushrooms” : 4.79,
“onions” : 1.48,
“oranges” : 1.15,
“papaya” : 1.81,
“pears” : 1.94,
“peas” : 2.20,
“potatoes” : 1.29,
“squash” : 1.57,
“tomatoes” : 2.01,
}

Example run:
We have the following produce in stock:
apples asparagus avocados bananas beans
beets broccoli cabbage carrots celery
cucumbers eggplant garlic grapefruit lemons
limes cantaloupes mushrooms onions oranges
papaya pears peas potatoes squash
tomatoes
Enter the item to look up the price: (enter ‘q’ to quit) PEARS
The price per pound of pears is $1.94
Enter the item to look up the price: (enter ‘q’ to quit) lemons
The price per pound of lemons is $1.67
Enter the item to look up the price: (enter ‘q’ to quit) liMes
The price per pound of limes is $2.53
Enter the item to look up the price: (enter ‘q’ to quit) watermelon
I’m sorry, we don’t have any watermelon in stock
Enter the item to look up the price: (enter ‘q’ to quit) q
Thank you for using the lookup tool!