第12813题 单选题
找出小陈编写的计算超市打折活动Python程序的报错原因
def discount(price, rate):    
    final_price = price * rate

old_price = float(input('请输入原价:'))
rate = float(input('请输入折扣率:'))
discount(old_price, rate)
print('打折后价格是:', final_price)
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析