# Code for Dr. Wilson's section of CMSC 201 import random QUIT1="quit" QUIT2="exit" MIN_PIN = 0000 MAX_PIN = 9999 def main(): random.seed() passes={} userChoice = input("Enter a username or choose " + QUIT1 + " or " \ + QUIT2 + " to quit. ") while userChoice != QUIT1 and userChoice != QUIT2: if userChoice in passes: print("The PIN for ", userChoice, " is ", passes[userChoice]) else: newPin = random.randrange(MIN_PIN,MAX_PIN+1,1) passes[userChoice] = newPin print("The PIN for the new user ", userChoice, \ " is ", passes[userChoice]) userChoice = input("Enter a username or choose " + QUIT1 + \ " or " + QUIT2 +" to quit. ") print("The dictionary contains these values ", passes) main()