def test(): ## sateMap={"Richmond":"VA","Boston":"MA","Atlanta":"GA","Seattle":"WA"} ## city = input("Enter a city name: ") ## if (city in sateMap): ## print(city+" is in "+sateMap[city]) ## else: ## print("sorry, never heard of it.") counts=dict() while True: n = int(input("enter am integer (0 - end): ")) if (n == 0): break if (n in counts): counts[n]=counts[n]+1 else: counts[n]=1 print("I have seen ", n,"a total of",counts[n],"time(s)") print("Done, counts:", counts)