Python 代码输出显示不正确
Python code output isn't displaying properly
我的代码看起来不错,但是当我 运行 它并输入销售额时,它不会显示佣金。
这是 python 顺便说一句。
keep_going = "y"
while keep_going == "y":
sales = float(input("Enter the amount of sales: "))
comm_rate = 10
commission = sales * comm_rate
print ("The commission is: "),commission
keep_going = input("Do you want to calculate another commission? (Enter y for yes): ")
main()
变化:
print ("The commission is: "),commission
收件人:
print ("The commission is: ", commission)
我的代码看起来不错,但是当我 运行 它并输入销售额时,它不会显示佣金。
这是 python 顺便说一句。
keep_going = "y"
while keep_going == "y":
sales = float(input("Enter the amount of sales: "))
comm_rate = 10
commission = sales * comm_rate
print ("The commission is: "),commission
keep_going = input("Do you want to calculate another commission? (Enter y for yes): ")
main()
变化:
print ("The commission is: "),commission
收件人:
print ("The commission is: ", commission)