저는 프로그래밍 수업에서 파이썬으로 무언가를 만드는 프로젝트를 가지고 있고 pokedex를 만들기로했습니다. 하지만 그것을 왜 pokenumber 그것을 묻는 때 1의 입력 줄 때 아무도 반환하지 확실하지 않습니다.Python 변수가 인쇄되지 않습니다
import random
import time
print "Hello new Trainer!"
time.sleep(1.6)
print "I am your Kanto region Pokédex"
time.sleep(2.3)
print "Please enter your name below so I may know what to call you."
time.sleep(2)
name = raw_input("Name:")
time.sleep(1)
print "Hello %s, it is nice to meet you" % (name)
time.sleep(2)
print "I am a Pokédex, a Pokédex is a database of Pokémon."
time.sleep(3)
print "This Pokédex is specific for Pokémon in the Kanto region."
time.sleep(3.5)
print "All Pokémon have an assigned number that corresponds to that certain Pokémon species"
time.sleep(4)
print "For example, Pikachu is the 25th entry in the Pokédex!"
time.sleep(3)
print "When you enter a Pokémon's # it will bring up all available information on that Pokémon"
time.sleep(5)
print "Please enter a number between 1 and 151 to learn about the Pokémon associated to that number."
Bulbasaur = "Bulbasaur can be seen napping in bright sunlight. There is a seed on its back. By soaking up the sun's rays, the seed grows progressively larger."
userpoke = raw_input("Pokémon #:")
def userpoke():
if userpoke == 1:
print (Bulbasaur)
같은 이름의 변수와 함수가 있습니다! –
diff 함수 이름이 있어야하고 마침내 호출해야하며'string'을'raw_input'의'int'로 변환해야합니다. – Devansh
여기서 많은 질문을하기 전에 지시 사항을 검토해야한다고 잘못 생각하고 있습니다. – TigerhawkT3