stu_name= input('请输入姓名:')
living_expenses = float(input('请输入日常生活支出(元):'))
school_things = float(input('请输入学习用品支出(元):)
otherexpendses = float(inp(其他方面支出(元):))
total_expenses =livingexpses + school_things + other_expendses
print('=' * 35)
print('以下是{}的支出情况:'.format(stu_name))
print('日常生活支出:{0:.2f}元,占比:{1:.2%}'.format(living_expenses,
living_expenses / total_expenses))
print('学习用品支出:{0:.2f}元,占比:{1:.2%}'.format(school_things,school_things / total_expenses))
print('其他方面支出:{0:.2f}元,占比:{1:.2%}'.format (other_expendses,
other_expendses / total_expenses))
living_expenses = float(input('请输入日常生活支出(元):'))
school_things = float(input('请输入学习用品支出(元):)
otherexpendses = float(inp(其他方面支出(元):))
total_expenses =livingexpses + school_things + other_expendses
print('=' * 35)
print('以下是{}的支出情况:'.format(stu_name))
print('日常生活支出:{0:.2f}元,占比:{1:.2%}'.format(living_expenses,
living_expenses / total_expenses))
print('学习用品支出:{0:.2f}元,占比:{1:.2%}'.format(school_things,school_things / total_expenses))
print('其他方面支出:{0:.2f}元,占比:{1:.2%}'.format (other_expendses,
other_expendses / total_expenses))