# 求平均成绩(python3解释器)
#
#- 输入学生姓名;
#- 依次输入学生的三门科目成绩;
#- 计算该学生的平均成绩, 并打印;
#- 平均成绩保留一位小数点;
#- 计算该学生语文成绩占总成绩的百分之多少?并打印。eg: 78%;
#
name = input("学生姓名:")
chinese = float(input("语文成绩:"))
math = float(input("数学成绩:"))
english = float(input("英语成绩:"))
# 总成绩
sumScore = chinese+math+english
# 求平均成绩
avgScore = sumScore/3
# 求百分比, 0.33*100 = 33.33 ----- 33.33%
chinesePercent = (chinese / sumScore)*100
print("%s 的平均成绩为%.2f" %(name, avgScore))
print("语文成绩占总成绩的%.2f%%" %(chinesePercent))