Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- incoming = float(input())
- grade = float(input())
- min_salary = float(input())
- social_scholarship = int(min_salary * 0.35) # math.floor може да се ползва
- excellent_scholarship = int(grade * 25)
- # 1. Успех над 5.50 включително.
- if grade >= 5.50:
- # 1.1 Социалната стипендия е по-висока и има право на нея - даваме социална стипендия.
- if social_scholarship > excellent_scholarship and incoming < min_salary:
- print(f"You get a Social scholarship {social_scholarship} BGN")
- # 1.2 Взима стипендия за отличен успех - даваме стипендия за отличен успех.
- else:
- print(f"You get a scholarship for excellent results {excellent_scholarship} BGN")
- # 2. Успех над 4.50 и по-малък от 5.50.
- elif 4.50 < grade < 5.50: # elif grade < 4.50:
- # 2.1 Ако има право на социалната стипендия я даваме.
- if incoming < min_salary:
- print(f"You get a Social scholarship {social_scholarship} BGN")
- # 2.2 Ако няма право на социална стипендия отпечатваме, че не взима нищо.
- else:
- print("You cannot get a scholarship!")
- # 3. Успех по-малък или равен на 4.50 - отпечатваме, че не взима нищо
- elif grade <= 4.50: #else:
- print("You cannot get a scholarship!")
Add Comment
Please, Sign In to add comment