What I want the function to do is prompt the user for a valid command. The list of valid commands is defined by the variable valid_cmds, which is a list of pairs, with each pair