Scholarship - Conditional Statements Excercise
Здравейте,
Кодът по-долу ми дава грешки в Джъдж:
import math
income = float(input())
average_grades = float(input())
min_salary = float(input())
social_scholarship_bool = False
excelent_scholarship_bool = False
if income < min_salary and average_grades > 4.50:
social_scholarship_bool = True
social_scholarship = min_salary * 0.35
if average_grades >= 5.50:
excelent_scholarship_bool = True
excelent_scholarship = average_grades * 25
if social_scholarship_bool and excelent_scholarship_bool:
if social_scholarship_bool > excelent_scholarship_bool:
print(f'You get a Social scholarship {math.floor(social_scholarship)} BGN')
else:
print(f'You get a scholarship for excellent results {math.floor(excelent_scholarship)}')
elif social_scholarship_bool:
print(f'You get a Social scholarship {math.floor(social_scholarship)} BGN')
elif excelent_scholarship_bool:
print(f'You get a scholarship for excellent results {math.floor(excelent_scholarship)}')
else:
print(f'You cannot get a scholarship!')
Може ли малко разяснения?
Благодаря!
Да, това определно е доста по-разбираемо. Благодаря!