Advertisement
Dimitar23308

Untitled

Dec 3rd, 2023
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1.  зад.3
  2.  
  3.  
  4.  
  5. working_days=int(input())
  6. bike_price=float(input())
  7.  
  8. total_money=0
  9. for day in range(1, working_days + 1):
  10.     if day % 2 == 0:
  11.         salary= 100
  12.     else:
  13.         salary= 150
  14.  
  15.     if day % 5 == 0:
  16.         salary *= 0.8
  17.  
  18.     total_money += salary
  19.     total_money -= 10  # wife's coffee money
  20.  
  21. if total_money >= bike_price:
  22.     print(f"Да, и ми останаха {total_money - bike_price} лева")
  23. else:
  24.     print(f"Не, трябват ми още {bike_price - total_money} лева")
  25.  
  26.  
  27.  
  28. зад.4 господине не я разбирам и не мога да я направя.
  29.  
  30.  
  31.  
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement