elec = int(input())
if elec < 0:
print('Invalid Value!')
elif elec <= 50:
print('cost = %.2f' % (elec*0.53))
else:
cost = 50*0.53+0.58*(elec-50)
print('cost = %.2f' % cost)
浙大版《Python 程序设计》题目集 第2章-3 阶梯电价 (15分)
猜你喜欢
转载自blog.csdn.net/weixin_42229583/article/details/104553651
今日推荐
周排行