运行时遇到语法错误:
class Stats:
Str = random.randint(3,18)
Int = random.randint(3,18)
Wis = random.randint(3,18)
Char = random.randint(3,18)
Con = random.randint(3,18)
print "Type the name of a stat (Str, Int, Wis, Char or Con) to see its value"
它说'结束'引用是语法错误 - 因为字符串语法错误何时?
答案 0 :(得分:3)
您使用的是python 3+吗? print
是python 3中的一个函数。
class Stats:
Str = random.randint(3,18)
Int = random.randint(3,18)
Wis = random.randint(3,18)
Char = random.randint(3,18)
Con = random.randint(3,18)
print("Type the name of a stat (Str, Int, Wis, Char or Con) to see its value")