1. No error is caused, but trying to use the key pointing to the self reference induces a warning about recursion, and stops immediately. 2. --- unique_count.py --- d = {} s = raw_input('Enter a name: ') while s != '': if s in d: d[s] += 1 else: d[s] = 1 s = raw_input('Enter a name: ') print d --- end unique_count.py --- 3. --- string_dict.py --- d = {} s = raw_input('Enter a key:value pair> ') while s != '': p = s.find(':') if p != -1: key = s[:p] value = s[p+1:] else: key = s value = None if key in d: print d[key] d[key] = value s = raw_input('Enter a key:value pair> ') for k, v in d.items(): print k, ":", v --- end string_dict.py --- 4. --- guestbook.py --- #!/usr/bin/python database = {} name = raw_input("Please enter your name: ") while name != 'quit': if name == 'showcomments': for customer in database: print "%s\n\t%s"%(customer.capitalize(), database[customer.lower()]) else: if name.lower() in database: print "Welcome back", name.capitalize() print "\t%s"%(database[name.lower()]) comment = raw_input("Please enter your comment: ") if comment != "": database[name.lower()] = comment name = raw_input("Please enter your name: ") --- end guestbook.py ---