Advertisement
Lie_exe

Untitled

Sep 16th, 2023
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. prices = [2, 50, 70, 30]
  2. new_prices = []
  3. was = []
  4.  
  5. for work in prices:
  6. if work <= 20:
  7. (new_prices.append(work * 0.20))
  8. elif (work >= 20) and (work >= 50):
  9. (new_prices.append(work * 0.40))
  10.  
  11. print(new_prices)
  12.  
  13.  
  14. for price in prices:
  15. if price <= 20:
  16. price = price * 0.8
  17. was.append(price)
  18. print(was)
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement