Re: [Tutor] How do i show discount?

2011-11-19 Thread Steven D'Aprano
ADRIAN KELLY wrote: how would i show the discount in main? Look at your shop() function: def shop(total_spend): min_spend=25 discount_amount=150 discount=0.05 if total_spend >= min_spend and total_spend > discount_amount: checkout=total_spend-(total_spend*discount)

[Tutor] How do i show discount?

2011-11-19 Thread ADRIAN KELLY
def shop(total_spend):min_spend=25discount_amount=150discount=0.05 if total_spend >= min_spend and total_spend > discount_amount: checkout=total_spend-(total_spend*discount) discount=total_spend*discountelse:checkout = total_spend discount =