Who encouraged Lennon and McCartney to write a song ?
By an agreement made before the Beatles became famous , Lennon and McCartney were credited equally with songs that either one of them wrote while their partnership lasted .