Question: 1.Create a list called Professor_SuperMarket with four elements from your favorite supermarket. 2. Print a string with the first and last elements of the Professor_SuperMarket
1.Create a list called Professor_SuperMarket with four elements from your favorite supermarket.
2. Print a string with the first and last elements of the Professor_SuperMarket list.
3. Create a tuple called Yogurt_expiration with three elements: the month, day, and year of the expiration date on
the nearest carton of Yogurt.
4. Print the values in the Yogurt_expiration tuple in a string that reads This Yogurt carton will expire on 12/10/2005.
5. Create an empty dictionary called Yogurt_carton. Add the following key/value pairs. You can make up the values or use a real
Yogurt carton:
expiration_date Set it to the Yogurt_expiration tuple.
fl_oz Set it to the size of the Yogurt carton on which you are basing this.
Cost Set this to the cost of the carton of Yogurt.
brand_name Set this to the name of the brand of Yogurt youre using.
6. Print out the values of all of the elements of the Yogurt_carton using the values in the dictionary,and not, for
instance, using the data in the Yogurt_expiration tuple.
7. Show how to calculate the cost of six cartons of Yogurt based on the cost of Yogurt_carton.
8. Create a list called cheeses. List all of the cheeses you can think of. Append this list to the
Professor_SuperMarket list, and look at the contents of Professor_SuperMarket. Then remove the list of cheeses from the array.
9. How do you count the number of cheeses in the cheese list?
10. Print out the first five letters of the name of your first cheese.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
