Why does my dictionary was accepting value when i have input a valid key and invalid value at first i saw it was error but when i finish the program when my program display