我在使用dcoder时遇到问题。我的意见是: 20 50 8 30至10
它不仅输出80条语句,而且还输出输入语句的提示。我怎么才能把它打印出来呢?你知道吗
maxw = int(input("bag weight: "))
itemOne = input("item value & weight:") #item 1
itemTwo = input("item value & weight:") #item 2
lone, ltwo = itemOne[0:3], itemTwo[0:3] #rid of " "
iione, iitwo = int(lone), int(ltwo) #change to int
def total_value(x, y):
tval = x + y #add together 50 and 80
return tval
result = total_value(iione, iitwo)
print(result)
![enter image description here](https://i.stack.imgur.com/f8Jh4.png)![enter image description here](https://i.stack.imgur.com/zCAcC.png)
目前没有回答
相关问题 更多 >
编程相关推荐