Skip to main content
 首页 » 编程设计

python之无法在我的 "print"语句中连接整数

2025年05月04日19mq0036

<分区>

我无法在 print 语句中将整数与字符串放在一起,并将它们连接在一起。

pounds = input("Please type in your weight in pounds: ") 
 
weight = int(pounds) * 0.45 
 
print("You " + weight) 

我以为我可以把它们放在一起,为什么我做不到?