Question
can someone pls help me with these python problems ? IN PYTHON 1- Write a function called dishlist_change_price that takes a list of Dishes and
can someone pls help me with these python problems ?
IN PYTHON
1- Write a function called dishlist_change_price that takes a list of Dishes and a number representing a percentage change and returns a list of Dishes with each price changed by the specified amount. (Since lists are mutable, ask yourself how you'd write this differently if the specification were to change the list itself rather than returning a new list with changed prices.
2- Write a function called dishlist_prices that takes a list of Dishes and returns a list of numbers containing just the prices of the dishes on that list.
3- Write a function called dishlist_average that takes a list of Dishes and returns the average price of those dishes. (Again, call previously defined functions wherever possible; don't reinvent the wheel.)
4- Write a function called dishlist_keep_cheap that takes a list of Dishes and a number and returns a list of those dishes on the original list that have prices less than that number. This is much like keeping the consonants in a string
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started