You are on page 1of 1

import random

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()

You might also like