Professional Documents
Culture Documents
Rand
Rand
letterString="QWERTYUIOPASDFGHJKLZXCVBNM"
def pickNewLetter():
randspot=random.randint(0,25)
return randspot
def ask():
command=input("Press return to get a letter. ")
command=command.lower()
return command
def go():
while True:
if ask()=="stop":
break
else:
letternum=pickNewLetter()
letter=letterString[letternum]
print(letter)
letternum=pickNewLetter()
go()