Sichanov

Scholarship

Jan 20th, 2021
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.16 KB | None | 0 0
  1. income = float(input())
  2. average_success = float(input())
  3. min_salary = float(input())
  4.  
  5. social_scholarship = int(min_salary * 0.35)
  6. excellent_scholarship = int(average_success * 25)
  7.  
  8. if average_success < 4.50:
  9.     print("You cannot get a scholarship!")
  10. elif 4.50 <= average_success < 5.50 and income >= min_salary:
  11.     print("You cannot get a scholarship!")
  12. elif 4.50 <= average_success < 5.50 and income < min_salary:
  13.     print(f"You get a Social scholarship {social_scholarship} BGN")
  14. elif average_success >= 5.50 and income < min_salary and social_scholarship > excellent_scholarship:
  15.     print(f"You get a Social scholarship {social_scholarship} BGN")
  16. elif average_success >= 5.50 and income < min_salary and social_scholarship <= excellent_scholarship:
  17.     print(f"You get a scholarship for excellent results {excellent_scholarship} BGN")
  18. elif average_success >= 5.50 and income >= min_salary:
  19.     print(f"You get a scholarship for excellent results {excellent_scholarship} BGN")
  20.  
  21. # или с използване на else: вместо последния elif
  22. # else:
  23. #     print(f"You get a scholarship for excellent results {excellent_scholarship} BGN")
  24.  
Advertisement
Add Comment
Please, Sign In to add comment