No, you don't need a dedicated graphics card to start learning to code. Even if your laptop has Intel or AMD's integrated GPU, you can start to learn. But if you wish to learn something like game development or data science, then you will require a dedicated GPU for a brilliant performance.