Recommendations for learning Python as a complete n00b

Associate
Joined
20 Sep 2003
Posts
2,375
Location
Scotland
I want to try my hand at coding after many years of being sat a computer and not knowing where to begin to try and understand code. I have given it a bash in the past but given up very quickly. I have a basic understanding of HTML and CSS and can get my way around getting a website together but that’s as far as it goes. I feel python is a good route into coding?

I have some spare time at work and thought it would be good to utilise the time starting to learn coding practises. My machine is pretty locked down so was looking for recommendations for free online courses that can be done within the browser, so writing the code and executing it within the browser.

Does anyone have any recommendations?

On a side note, I can VNC to my home windows PC and have SSH and VNC access to my Raspberry Pi running Kali. Maybe those could be used?



Cheers
 
Have a look at CS50p. I'm currently (slowly) going through it as and when I feel like it just for fun/knowledge.

I previously completed the original CS50x which has a bit of python in it, but the 'p' flavour of the course is purely focussed on python.
 
Just picking this topic back up again after watching some YouTube videos. Does anyone have experience or can recommend freecodecamp?..... is this a recognised course within the industry and is it tailored for complete beginners?
 
I used udacity a few years ago to get to grips with python, it seemed to work for me (sadly through not having any frequent ongoing use I've forgotten a lot of it now :D). The harvard one has been recommended as a free resource for years and years, it's got to be decent, I'm thinking I'll pick up coding again soon and this seems like a good one for a refresher.
 
My machine is pretty locked down so was looking for recommendations for free online courses that can be done within the browser, so writing the code and executing it within the browser.

Does anyone have any recommendations?

A quick and easy way of writing some Python code would be to use Google's Colab - they've basically adapted Jupyter notebooks:

All you need is a Google account:

You can connect to your Google Drive to read/save files etc.. so no need for anything on your work computer other than just using your browser. It's free too if you just need the CPU, if you do get into Data Science/Machine Learning and need access to GPUs then you can subscribe for like £10 a month or just buy credits (in fact I'm not sure there is much benefit in subscribing vs just using credits).

On a side note, I can VNC to my home windows PC and have SSH and VNC access to my Raspberry Pi running Kali. Maybe those could be used?

Take a look at Anaconda too - obvs for courses where you do need to write a complete program and save a .py file etc.. you'll want a local installation, anaconda makes this easy as you can very quickly set up several Python environments if you break one then it doesn't matter and you can delete it, use another etc.. and indeed just have different environments for when you need different versions of particular packages.

There's also a lightweight miniconda installation that might be usefor for your Raspberry Pi.

While you can obviously write code in a text editor you'll probably want to look at some IDEs, Anaconda lets you install both Jupyter notebooks (which Colab is based on) and an IDE called Spyder very easily - the latter is similar to the MATLAB IDE and you'll want to use something like this or a text editor if creating .py files to run locally (Jupyter saves a different notebook file type - you can also save a Colab notebook to open in Jupyter locally).

Colab/Jupyter notebooks are handy for running little snippets of code, you can actively experiment with stuff quite easily. You can do a similar thing in Spyder by using code cells separated by #%% which is similar to MATLAB and lets you just run a snippet + there is a variable explorer. This can be useful when learning as you can easily run things in little steps and then see what values the variables are taking etc.

Then you might want to look at PyCharm (which also works well with Anaconda) and is perhaps a bit more of a fully-fledged professional IDE.
 
Last edited:
Did you find a course in the end?

I would recommend anyone to try: https://www.codecademy.com/catalog/language/python

I’m currently doing the Go course and its pretty good for covering the fundamentals/syntax. There’s also a code editor in the browser window along with a CLI.

That website looks pretty decent might try that myself

Anyone else find that watching videos it feels as though the person speaking just goes on and on rather than getting on with it and telling you what it does? maybe I need to try learning from a book rather than watching a video
 
The best way to learn is to open a text editor and start messing about.

That site is good for getting you in the habit of writing the syntax, especially if you come from other languages.

Heres some sample projects for Python you can follow:

I use Go on and off, mostly for data manipulation but working my way through the codecademy course gives me a better understanding of whats what. The CLI is a nice feature.
 
I have always been a very practical person, so for me the best way is the practical way. Have a go, and read references as you need them. Then, when you have a pretty reasonable practical understanding, read a book to answer all those questions you've built up.
 
Myself, being a rather poor programmer the best way for it to stick is if you are using the software almost daily. I have some basic grounding though so I prep out the task now and depending on what language or scripting it is I get one of the gpt tools now to correct me. This means time is massively improved and on I go.

I have some spare time at work and thought it would be good to utilise the time starting to learn coding practises. My machine is pretty locked down so was looking for recommendations for free online courses that can be done within the browser, so writing the code and executing it within the browser.

Does anyone have any recommendations?

I have first hand painful experience of this and had to stop using python as we navigated a cyber certification process. So my workaround for that is to either a) cobble a redundant/spare laptop and use that to install all the apps for working on or b) use the browser based ones like cloud notebooks (anaconda?)

Now going back to your OP if you want to 'learn' it properly try not to take the shortcuts as you want to grasp the principles and the regular techniques - then its quite easy to apply to most programming tasks to be honest.
 
Last edited:
Back
Top Bottom