Home > other >  Python list index beyond the scope of how to solve
Python list index beyond the scope of how to solve

Time:04-10

Def Discount (money) : sum=0 for I money: in sum=sum + money [I] if the sum of <500: return the sum, sum elif sum>=500 and the sum of <1000: return the sum, sum * 0.9 elif sum>=1000 and the sum of <2000: return the sum, sum * 0.8 elif sum>=2000 and the sum of <3000: return the sum, sum * 0.7 elif sum>=3000: return the sum, sum * money=,29,863 [1000] s=0.6 Discount (money) print (s)
  • Related