【发布时间】:2016-11-14 23:38:31
【问题描述】:
# -*- coding: utf-8 -*-
#displays title
print (" H___________________________________________ ")
print ("/========/| █░█ █▀▀█ █▀▀█ █░░ █▀▀█ █▀▀▄ █▀▀▄ \ ")
print ("|||||||||||-█̶▀̶▄̶ ̶█̶░̶░̶█̶ ̶█̶░̶░̶█̶ ̶█̶░̶░̶ ̶█̶▄̶▄̶█̶ ̶█̶░̶░̶█̶ ̶█̶░̶░̶█̶ -\ ")
print ("\========\|_▀̲░̲▀̲ ̲▀̲▀̲▀̲▀̲ ̲▀̲▀̲▀̲▀̲ ̲▀̲▀̲▀̲ ̲▀̲░̲░̲▀̲ ̲▀̲░̲░̲▀̲ ̲▀̲▀̲▀̲░̲ __\ ")
print (" H ")
print (" = ")
#intro
print ("Welcom to the land of kool")
#asks your name
name = input ("Can you tell me your name!")
#says hello
print ("Well hello",name,"!")
错误显示:
NameError: name '______' is not defined
【问题讨论】:
-
我看不懂你的代码,也不懂你的问题。
-
你用的是什么版本的 Python?
-
另外,请展示一个示例运行。您可以从控制台复制并粘贴它。确保在输出的每行开头包含四个空格。
-
我没有例外。
-
@nawi 这可能是因为您使用的是 Python 3.x 而 OP 使用的是 Python 2.x。这意味着OP需要使用
raw_input()而不是input()。