【发布时间】:2015-03-23 02:33:29
【问题描述】:
我是新手。我已经开始在 Ubuntu 上使用 python。我的版本是 Python3.4 我写了以下代码并得到了错误:
>>> g=input("Enter number here: ")
Enter number here: 43
>>> g+7
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Can't convert 'int' object to str implicitly
>>> a= input("Enter:")
Enter:43
>>> a +32
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Can't convert 'int' object to str implicitly
>>> a+32
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Can't convert 'int' object to str implicitly
>>>
有什么可以帮忙的吗?
【问题讨论】:
标签: python