本文介绍了为什么我在Python中收到错误代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在变量中写一些数字数据,但是我收到了一个错误。
我尝试了什么:
boy_name =Steve
print(我是+ boy_name +,)
character_age = 11
print(我是+ character_age +,)
i was trying to write some numerical data in variables but i am getting a error.
What I have tried:
boy_name = "Steve"
print("I am " + boy_name + ",")
character_age = 11
print("I am " + character_age + ",")
推荐答案
print("I am " + str(character_age) + ",")
这篇关于为什么我在Python中收到错误代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!