# File: ChapterControlFunc/swithcDie.py """ Roll die two More(y/n)?r three More(y/n)?n """ import random def main(): print("Roll die ") while True: d = random.randrange(1,7) if (d ==1 ): print ('one') elif (d == 2 ): print ('two') elif (d == 3 ): print ('three') elif (d == 4): print ('four') elif (d == 5 ): print ('five') elif (d == 6): print ('six') ans = input('More(y/n)?') if (ans =='n' or ans == 'N'): break print('bye') main()