Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #1.Input
- # 1. Доход в лева - реално число;
- # 2. Среден успех - реално числсо;
- # 3. Минимална работна заплата – реално число.
- income=float(input())
- avgRes=float(input())
- minSal=float(input())
- #2. CAlculate social scholarship = 35% от минималната работна заплата.
- socialScholar=minSal*0.35
- #3. Calculate scolar scholaship = - успехът на ученика, умножен по коефициент 25.
- scolarSchol=avgRes*25
- #4: Check condition for which scolarship student will be receive:
- getScolSchol = 'N'
- getSocialScholar = 'N'
- # Изискване за стипендия за отличен успех - успех над 5.5, включително.
- if avgRes>=5.5:
- getScolSchol='Y'
- # Изискване за социална стипендия - доход на член от семейството по-малък от минималната работна заплата и успех над 4.5.
- if income<minSal and avgRes>4.5:
- getSocialScholar='Y'
- # • Ако ученикът има право да получава само социална стипендия:
- if getSocialScholar=='Y' and getScolSchol!='Y':
- print(f"You get a Social scholarship {int(socialScholar)} BGN")
- elif getSocialScholar!='Y' and getScolSchol=='Y':
- print(f"You get a scholarship for excellent results {int(scolarSchol)} BGN")
- # • Ако ученикът има право да получава само стипендия за отличен успех:
- # "You get a scholarship for excellent results {стойност на стипендията} BGN"
- # elif (getSocialScholar=='Y' and getScolSchol=='Y') and (scolarSchol<socialScholar):
- # print(f"You get a Social scholarship {socialScholar:0.2f} BGN")
- # elif (getSocialScholar=='Y' and getScolSchol=='Y') and (scolarSchol>socialScholar):
- # print(f"You get a scholarship for excellent results {scolarSchol:0.2f} BGN")
- #
- elif getSocialScholar=='Y' and getScolSchol=='Y':
- if scolarSchol>=socialScholar:
- print(f"You get a scholarship for excellent results {int(scolarSchol)} BGN")
- else:
- print(f"You get a Social scholarship {int(socialScholar)} BGN")
- else:
- print("You cannot get a scholarship!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement