Obviously. Humans belong to order of primates.<p>No other species of primate has symbolic language as far as we can tell, so they probably can’t learn to code.
Depends on how simple your code is. I can imagine that a smart tool-using animal could be trained to use a mechanical computer or 'program' a simple sequence, but the prime motivator (that humans can supply) for most animals is food, so you would end up with a Rube-Goldberg food dispenser or something, not literal codemonkeys.