刚开始 Python 的介绍,之前没有关于 coding-That 的知识 教授的标题没有解释任何想法

Just started Intro to Python an have no previous knowledge about coding-That being said Professors rubric didn't explain anything any ideas

Traceback (most recent call last):
  File "challenges/str.py", line 7, in <module>
    result = 'a string combined with the number: ' + aString
TypeError: Can't convert 'int' object to str implicitly

由于缺少代码,没有解释,在我看来aString对象是一个整数。

要解决此问题,错误行应变为:

result = 'a string combined with the number: ' + str(aString)

希望这对您有所帮助!