age = 0
joke = 'What do you call a cow with no legs? Ground beef.'
myName = raw_input('Hello! What is your name?')
myAge = raw_input('Tell me your age, ' + myName + ', to hear a joke!')
if age < 6:
print('You are too young to hear this joke.')
elif age > 12:
print('You are too old to hear this joke.')
elif age == range(6, 12):
print(joke)
的代码在运行时,只说我太年轻了,听到这个笑话,即使我把一个数高于6,甚至高于12莫非你帮我解决这个问题?代码告诉笑话,如果用户是某一年龄之间
怎么能单号('age')永远等于一个数字范围? –