gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 08:27:37 25 4
gpt4 key购买 nike

<分区>

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

pounds = input("Please type in your weight in pounds: ")

weight = int(pounds) * 0.45

print("You " + weight)

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com