My first Smiley 

Atari 800 XL

It had tape and cartridge, I can't remember what the keys down the right hand side did. But it did come with a book of code you could bash in to create simple games. The only problem I remember was if you made just a single mistake, you had to type it all out again... That said, I was about 6 years old so my memory is somewhat fuzzy.