Advertisement
simeonshopov

Scholarship 100/100

Sep 17th, 2019
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.79 KB | None | 0 0
  1. import math
  2.  
  3. dohod = float(input())
  4. grade = float(input())
  5. pay_check = float(input())
  6.  
  7. excellent_grade = grade >= 5.5
  8. money = dohod < pay_check
  9. avg_grade = 5.5 > grade >= 4.5
  10. social_scholarship = pay_check*0.35
  11.  
  12. if money and avg_grade:
  13.     print(f"You get a Social scholarship {math.floor(social_scholarship)} BGN")
  14. elif excellent_grade and money:
  15.     scholarship = grade*25
  16.     if social_scholarship > scholarship:
  17.         print(f"You get a Social scholarship {math.floor(social_scholarship)} BGN")
  18.     elif social_scholarship <= scholarship:
  19.         print(f"You get a scholarship for excellent results {math.floor(scholarship)} BGN")
  20. elif excellent_grade:
  21.     print(f"You get a scholarship for excellent results {math.floor(grade*25)} BGN")
  22. else:
  23.     print(f"You cannot get a scholarship!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement