课堂练习,快考试了,还不会做

img


不用举例子了,做了半天,一分也没有,实在不会了,按公式写题,。


a=float(input())
b=float(input())
print('%.2f'%((a+b)/3))
print('%.2f'%((a+b)/3-b))
a=float(input())
b=float(input())
x=(a+b)/3
y=(a-2*b)/3
print('%.2f'%x)
print('%.2f'%y)

a = float(input())
b = float(input())
print(round((a+b)/3,2))
print(round((a-b*2)/3,2))

a=float(input())
b=float(input())
x=(a+b)/3
y=(a-b*2)/3
print('{:.2f}'.format(x))
print('{:.2f}'.format(y))
您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!
PS:问答VIP年卡 【限时加赠:IT技术图书免费领】,了解详情>>> https://vip.csdn.net/askvip?utm_source=1146287632