Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRutendo Chidewu
3,529 Pointspartial
now use a partial to make a version of discount that applies a 10% discount. Name this partial function discount_10
2 Answers
Anupam Kumar
3,795 Pointsfrom functools import partial
prices = [
10.50,
9.99,
0.25,
1.50,
8.79,
101.25,
8.00
]
def discount(price, amount):
return price - price * (amount/100)
discount_10=partial(discount,amount=0.10) ```
What is worng with code, it seems fine
how to get the list of values which get returned from the discount_10 that is from partial
Vincent Zamora
3,872 Pointsuse "amount=10" instead of "amount=.10".
Steven Parker
231,898 PointsSteven Parker
231,898 PointsIt looks like you've just quoted the instructions for a challenge. Please provide a link to the challenge page, and after giving it your best good-faith try, show the code you attempted and need help with.