Free interactive Python tutorials for beginners

Try it, debug it, extend it
Try it, debug it, extend it: Python tutorials

Over the next few weeks I’ll hopefully be publishing a series of 20 free interactive python tutorials for beginners.

Here’s the link to the list of resources

Each activity has four sections:

Theory: what you need to know if you’re in a hurry

Try it: working code snippets that you can adapt and use

Debug it: code sabotaged with common mistakes that you can practise fixing

Extend it: open ended project ideas for your to apply what you’ve learnt.

You can track your progress through each activity and generate a free PDF certificate showing your score at the end.

The first activity is all about getting your python program to output to the screen:

Making computing accessible for all

Making computing accessible for all

This series of posts aims is aimed at UK secondary school teachers to give some free ideas and resources in order to help make computing lessons engaging and inclusive in order to help attract more and more students to continue with the subject at GCSE and beyond.

When students are choosing their GCSE options they seem to love asking teachers why we chose to teach our subjects.

Often, I can almost see the cogs turning inside some of my students’ heads, weighing up whether they should choose Computing over Art; ticking off the benefits of each subject as they make the first real choice that might affect the rest of their lives.

Whatever they use to make up their mind – who teaches the subject / what their friends are choosing / what they’re good at / what they enjoy – there’s clearly a lot more that we can do to promote Computer Science as a viable, challenging, enjoyable and worthwhile option. The national figures show a pretty poor GCSE uptake of GCSE Computer Science compared to other eBacc subjects and an abysmal uptake by girls. Boys, whilst outnumbering girls at KS4 and beyond, are being outperformed by girls from KS2 onwards. So there’s definitely something not right there that needs addressing.

CAS include
CAS #include. Making computing accessible for all

I’ve been slowly working through the brilliant advice on the CAS #include site about how to ensure that my Computing lessons aren’t just catering for people like me and it strikes me that the way to be inclusive for all also looks and sounds like the way to be engaging and stretching for all. This post aims to share some of the mistakes I’ve made as well as some of the things I’m trying to put right to make sure that all students get the most out of their computing lessons, hopefully also boosting recruitment at KS4 too.

I’ve come up with 6 Cs to use as a checklist for planning engaging and inclusive computing projects:

Create.withcode.uk’s python data visualisation module now available offline

Some of the most popular resources on create.withcode.uk are the bitmap image challenges, which help students see how black and white or full colour images can be represented by 2D or 3D lists of data describing the colour of each pixel.

Data representation of images: Bitmap images
Python data visualisation of images: Bitmap images

A few people have asked if it’d be possible to have an offline version of the withcode python module that is supported by create.withcode.uk which allows you to quickly display a list of data as an image.

This could be useful for lessons or clubs where an Internet connection isn’t available or for use in other python projects.

You can now download a copy of withcode.py from https://github.com/pddring/withcode-py-offline and use it in IDLE / Mu / your favourite python IDE so that your code works in the same way as it would on create.withcode.uk

5 Life Lessons Young People Can Learn From Programming

5 Life Lessons Young People Can Learn From Programming
5 Life Lessons Young People Can Learn From Programming. Image source: PIXNIO

This article has been written by Kayleigh Alexandra from microstartups.org

microstartups.org: Giving through growth hacking

With the trend towards ever-greater automation, it’s becoming abundantly clear that the development of rich digital skills is increasingly important for new generations. That’s a good enough reason in itself to encourage young people to get involved with programming, but as they get stuck into software development they’ll no doubt encounter a treasure trove of life lessons with lasting consequences on their character as well as their future career.

In particular, there are 5 invaluable life lessons that immersion into the coding world can rapidly drill into a young person’s mind, ultimately helping them live happier and more successful lives — so let’s take a look at them, and consider why they’re so important.

Being self-driven is tough but vital

For anyone used to being given specific direction when learning a new skill (read this textbook front to back, answer these questions, and you’ll get a certificate), starting out with programming can be quite the wake-up call — it all owes to the essential spirit of experimentation and DIY.

Want to create a specific type of application? You’ll surely be able to find forums full of people who’ll give you pointers, but they won’t hold your hand and give you the answers. They’ll help you to find the answers for yourself, because self-management is a vital skill to develop.

As I type this, there are programmers across the world diligently updating their skills and poring over documentation, and they’re far too busy to lead you. The sooner you learn that you’re the only person who can solve your problems, the sooner you’ll realise how empowering and satisfying that is — no matter what you’re trying to achieve.

You need to use all available resources

Creativity and originality are rightly highly revered. Stealing other people’s ideas through outright plagiarism is an awful thing to do, and our egos drive us to achieve using our ideas as opposed to anyone else’s. But there’s a slight problem with that: originality isn’t really that original. It stems from our brains collating inspiration and making some minor tweaks. No inspiration, no breakthrough.

Programming imparts this wisdom very quickly through libraries. It’s a time-intensive industry, and there’s zero practical benefit in writing a chunk of code from scratch if you can find and repurpose established code for free — you may need to provide attribution, but that’s completely normal. It’s a very collaborative field.

An important lesson to learn is that the desire to be original and solitary can drive people to waste time on things that don’t ultimately matter. This is something that the ecommerce industry understands well. Merchants speed up anything non-essential (using freelancers for copy, buying websites instead of building them, conducting widespread competitor research, etc.), because part of being self-driven and empowered is knowing when there’s no sense in starting with a blank slate.

Small actions can have big consequences

One keystroke goes awry during a late-night coding session, it doesn’t get caught in review, and six weeks later a giant network goes down, staying down for days before someone identifies the root cause. Anyone who has ever thought “Well, it’s just a minor mistake, there’s no way it will ultimately matter” would get quite a shock from trying programming.

But there’s another interpretation of this that’s significantly more positive. Programming is something to be learned incrementally, with knowledge gradually spanning languages, topics and platforms, and that can be intimidating to someone new to it — but the concept of tiny steps gathering into a lengthy journey is key to long-term contentment.

You can’t learn Python in a day, but you can learn something about it, and build on it in the next lesson. Want to get healthier? Eat better today, and tomorrow, and the day after, going one day at a time, and soon enough you’ll be feeling better. Any goal you want to achieve should be targeted in the same way.

It isn’t hard work when you’re passionate

If you’ve ever heard some version of this statement said, you’ll know what I’m getting at. Programming is not something that immediately appeals to everyone. You can certainly understand why some might look at it and conclude that it’s an arduous, frustrating and repetitive war of attrition.

Here’s the thing: it’s a matter of perspective, and only when you find yourself researching a specific function in the early hours of the morning do you fully understand that anything — not matter how reductively you choose to define it — can be enjoyable and rewarding if you’re passionate about it.

Never forget this, or that tastes naturally change and develop over time. That way, you won’t judge things by how they sound but by how they feel to you (different people like different things). One day, you may even realise (to your surprise) that you’re one of the workaholics you always thought to be miserable, but working so vigorously because you want to.

Flexibility is a remarkable strength

Anyone who claims to know everything there is to know about programming is a liar and a charlatan, because there’s far, far too much out there for any one person to know it all. Countless languages, standards, practices, libraries, templates, and operational models — and each one subject to change on a daily basis.

And as nice as it sounds to pick up a specific set of skills and then profit from it for the rest of your life, that’s not how things work in the coding world. Every professional is expected to keep up with the latest developments, and periodically abandon large chunks of their knowledge to suit broad industry changes. Specific programming knowledge is vastly less important than the ability to obtain it as and when needed.

This is a momentous life lesson to learn because it essentially reassures people of two things: firstly, that they will never stop learning, and secondly, that they will keep getting better. The human ability to acquire new skills lasts about as long as we do, and the more you embrace your adaptability, the better you’ll fare.

10: Logic Errors in Python

There are three types of errors that you’ll come across when learning to program in python (or any language): syntax errors, runtime errors and logic errors.

Find and fix common errors in your code
Logic errors in python: Find and fix common errors in your code

Logic errors are often the hardest to find and fix so the aim of this activity is to help you recognize them, debug them and avoid making them wherever possible.

Contents:

Page 1: Intro

Page 2: The theory: learn what you need to know as fast as possible.

Page 3: Try it: try out and adapt some working python code snippets.

Page 4: Debug it: Learn how to find and fix common mistakes.

Page 5: Extend it: Choose a project idea to use your newfound python skills.