Description
3. Tuple Comprehension:
a. Create a tuple with numbers from 1 to 10.
b. Create a new tuple that contains the squares of each number in the original tuple using tuple comprehension.
c. Print the original and new tuple.
4. Dictionary and List:
a. Create a dictionary of items and their prices.
b. Create a shopping list as a list of tuples, where each tuple contains an item and the quantity you want to buy.
c. Calculate the total cost of your shopping list.
d. Print out the items and quantities in your shopping list along with their total cost.
5. Given the following two lists, print the elements from the color list whose index is listed in the favorite list:
color = [Red, Green, White, Black, Pink, Yellow]
favorite = [1, 4, 3]
David Updike –
Work was finished long before due and tutor was considerate and engaging. Perfect!
Julie Redd –
I highly recommend this website. It is definitely the best.
Joanie Khoury –
Thanks a lots, I really appreciate your effort it is an excellent report.
Chris Sims –
Very impressive work and way ahead of time! Thanks!
Andrew Porteck –
Fantastic support for every assignment, every time. 5+ Stars!