Do I need to purchase any software or hardware to learn coding from the beginning?
A computer is pretty much the only hardware you’ll need.
If you’re starting on web development, you’ll need a web browser and a text editor. There are plenty of free text editors you can use (e.g., VSCode, Atom, Brackets, Notepad++).
There are also plenty of free learning resources on the internet. You’re in one now
You don’t expect for a computer our tablet. Computer is better thou but, not necceary.
If you just are a beginner there are many tutorials onto youtube.
w3schools and fcc are also totally free but do donate to them if u can :3 after all we all love free stuff <3