Introduction to Computing
Topics
Exercises, exams, etc.
Exercises for Tutorial 1
Exercises for Tutorial 2
Exercises for Tutorial 3
Exercises for Tutorial 4
Exercises for Tutorial 5
Mid-sem exam
grading guidelines
y-pattern.py
hangman.py
red-blue-points.py
Websites with programming exercises / problems for practice
These websites seem to have a reasonable set of programming exercises
and problems that you can use for practice. Of course, there are MANY
more, but these seemed to me to be the most useful.
Suggestions
-
Take a quick look at each (maybe 5 minutes) and choose 1-2 that
you like. There is a large amount of material here, and you will
encounter some common exercises in multiple sites.
-
Start with the easy exercises if you need to warm up, but you should
really try to get comfortable solving at least the intermediate /
medium exercises. Some topics have not been covered, so some (maybe
quite a few) of the problems will not be relevant for you. If you
aren't sure, please feel free to ask.
-
I have also taken only a very quick look at each website, so my
impression / opinion could be inaccurate. If you choose a site and
either like it very much or think it is not very useful, I would
greatly appreciate your feedback, and will try to refine this list
based on your opinions.
Sites
-
Pynative Problems are categorised according to topic (including numpy and pandas); hints and solutions are provided.
-
HackerRank You can select practice problems by topics (e.g., basic data types, sets, strings, numpy), level of difficulty, and whether a solution is provided or not. Each problem is generally accompanied by test cases, and a discussion section.
-
W3 Schools Problems are categorised as Easy, Medium and Hard. It looks like you can subscribe to receive "Weekly Practice Problems" by email. You can also create a free account, and attempt solving problems online. Your code is tested against multiple hidden test cases with different inputs. Your score is based on how many tests pass. Partial credit is given for partially correct solutions.
-
mygreatlearning.com Problems are organised by topic and categorised as Easy, Medium and Hard. Solutions are provided.
-
Edabit Problems are categorised as Very Easy, Easy, Medium, Hard, Very Hard, and Expert. You should probably start with Medium. You can submit solutions and check it for correctness. There's also an AI(?) "Coach" that supposedly helps explain mistakes, and provides hint for your next attempt.
-
Python programming exercises (a github repo) Problems are categorised as Beginner, Intermediate and Advanced, with a description of what each level means. Each problem statement is immediately followed by a solution, so you should probably be a little careful while scrolling, give a problem a serious try and then look at the solution.
-
practicepython.org 40 beginner exercises along with solutions.
-
21 beginner level problems with solutions.
Recommended books
You will need to be a little careful about what edition you use, since Python is an evolving language. All the following books are based on reasonably recent versions of Python, but please use the edition mentioned below, or a more recent one, if available.
If you are new to programming (in any language)
If you have some programming experience (in any language)
-
Python in a Nutshell (4th edition) by Alex Martelli, and
others, O'Reilly, 2023 (Python 3.7 through 3.11).
-
Fluent Python (2nd edition) by Luciano Ramalho, O'Reilly,
2022 (Python 3.10).
- The Quick Python Book (4th edition) by Naomi Ceder,
Manning Publications, 2025 (Python 3.9).
-
Python Distilled by David M. Beazley, Addison-Wesley Professional,
2021-2022 (Python 3.8).
Online resources
Last modified: Sun Nov 8 00:53:54 IST 2026