I think you can pass on a tendency to persist rather than give up though. Perhaps persistence and effort is more learnable than intelligence, but there does seem to be some hint that there is a genetic component to this trait. I am thinking of some experiments done with dogs where the dogs were shocked and they could escape the shock by jumping over a fairly short barrier. Some dogs persisted until they found the way out while others fairly readily just gave up, sat down and started whimpering despite the shocks.