Advertisement
George_Ivanov05

08

Mar 15th, 2021
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.52 KB | None | 0 0
  1. income = float(input())
  2. average_grade = float(input())
  3. min_salary = float(input())
  4. social_scholarship = int(min_salary * 0.35)
  5. excellent_scholarship = int(average_grade * 25)
  6.  
  7. # 1. Успех над 5.50 включително
  8.     # 1.1 Доходът е по-голям от минималната заплата - даваме стипендия за отличен успех:
  9.     #  1.2 Доходът е по-малък от минималната заплата:
  10.         # При равни или по-висока стипендия за отличен успех - даваме нея
  11.         # Даваме социална стипендия
  12. # 2. уеспях междъ 4.50 и 5.50
  13.     # 2.1 Доходът е по-малък от минималната заплата:
  14.     # 2.2 Не даваме нишо
  15. # 3. Успех под 4.50 - Няма да взима стипендия
  16.  
  17.  
  18. if average_grade >= 5.50:
  19.     if income > min_salary:
  20.         print(f"You get a scholarship for excellent results {excellent_scholarship} BGN")
  21.     else:
  22.         if excellent_scholarship >= social_scholarship:
  23.             print(f"You get a scholarship for excellent results {excellent_scholarship} BGN")
  24.         else:
  25.             print(f"You get a Social scholarship {social_scholarship} BGN")
  26. elif average_grade > 4.50:
  27.     if income < min_salary:
  28.         print(f"You get a Social scholarship {social_scholarship} BGN")
  29.     else:
  30.         print(f"You cannot get a scholarship!")
  31. else:
  32.     print(f"You cannot get a scholarship!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement