考试分数评估

y=int(input("请输入您的语文分数:"))
s=int(input("请输入您的数学分数:"))
yy=int(input("请输入您的英语分数:"))
pjf=(y+s+yy)/3
s=pjf
sh=int(s)
s1=sh+0.5
if s>s1 or s==s1:
    sa=sh+1
    s3=str(sa) 
else:
    s3=str(sh) 
    print("本次考试平均分为",s3,"分")
if y>=s and y>=yy:
    d=y
    k="语文"
if s>=y and s>=yy:
    d=s
    k="数学"
if yy>=s and yy>=y:
    d=yy
    k="英语"
if y<=s and y<=yy:
    zx=y
    dk="语文"
if s<=y and s<=yy:
    zx=s
    dk="数学"
if yy<=s and yy<=y:
    zx=yy
    dk="英语"
if s==yy==y:
    print("三科分数相等")
else:
    if y==d:
         print("本次考试最高分为 语文 是",d,"分")
    if s==d:
         print("本次考试最高分为 数学 是",d,"分")
    if yy==d:
         print("本次考试最高分为 英语 是",d,"分")

    if y==zx:
         print("本次考试最低分为 语文 是",zx,"分")
    if s==zx:
         print("本次考试最低分为 数学 是",zx,"分")
    if yy==zx:
         print("本次考试最低分为 英语 是",zx,"分")
    c=d-zx
    print("您的最大分差为",c,"分")

执行结果

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值