1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| python = 3 math = 4 english = 4 physical_education = 2 military_theory = 2 philosophy = 2
tuition_per_credit = float(input("请输入每学分学费金额:")) living_expenses = float(input("请输入你每个月生活费:"))
total_credits = python + math + english + physical_education + military_theory + philosophy total_tuition = total_credits * tuition_per_credit total_cost = living_expenses * 5 + total_tuition student_loan = total_cost * 0.6
print(f"本学期你能够贷款{student_loan:.2f}元")
|