w3resource
w3resource logo
Python Exercises

Python Exercises, Practice, Solution

What is Python language?

Python is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than possible in languages such as C++ or Java.

Python supports multiple programming paradigms, including object-oriented, imperative and functional programming or procedural styles. It features a dynamic type system and automatic memory management and has a large and comprehensive standard library

The best way we learn anything is by practice and exercise questions. We have started this section for those (beginner to intermediate) who are familiar with Python.

Hope, these exercises help you to improve your Python coding skills. Currently, following sections are available, we are working hard to add more exercises .... Happy Coding!

List of Python Exercises :

Python NumPy :

Python Pandas :

Python Challenges :

Python Mini Projects :

Note :
Download Python from https://www.python.org/ftp/python/3.2/ and install in your system to execute the Python programs. You can read our Python Installation on Fedora Linux and Windows 7, if you are unfamiliar to Python installation.
You may accomplish the same task (solution of the exercises) in various ways, therefore the ways described here are not the only ways to do stuff. Rather, it would be great, if this helps you anyway to choose your own methods.

Popularity of Programming Language
Worldwide, Dec 2017 compared to a year ago:

Rank Change Language Share Trend
1 Java 21.5 % -1.4 %
2 Python 19.3 % +5.6 %
3 PHP 8.3 % -1.4 %
4 up arrow Javascript 7.9 % +0.3 %
5 down arrow C# 7.6 % -0.8 %
6 C 6.3 % -0.9 %
7 C++ 6.3 % -0.8 %
8 up arrow R 3.8 % +0.5 %
9 down arrow Objective-C 3.8 % -0.7%
10 Swift 3.0 % +0.2 %
11 Matlab 2.1 % -0.6 %
12 Ruby 1.7 % -0.3 %
13 up arrow VBA 1.4 % -0.0 %
14 up arrow TypeScript 1.3 % +0.2 %
15 Scala 1.2 % +0.2 %
16 down arrow Visual Basic 1.2 % -0.4 %
17 up arrow Kotlin 0.7% +0.9 %
18 down arrow Perl 0.7 % -0.2 %
19 Go 0.7 % +0.2 %
20 down arrow lua 0.4 % -0.2 %
21 up arrow Rust 0.3 % -0.0%
22 down arrow Delphi 0.3 % -0.1 %
23 down arrow Haskell 0.3 % -0.0 %

Source : http://pypl.github.io/PYPL.html

TIOBE Index for December 2017

Dec 2017 Dec 2016 Change Programming Language Ratings Change
1 1 Java 13.268% -4.59%
2 2 C 10.158% +1.43%
3 3 C++ 4.717% -0.62%
4 4 Python 3.777% -0.46%
5 6 up arrow C# 2.822% -0.35%
6 8 up arrow JavaScript 2.474% -0.39%
7 5 down arrow Visual Basic.NET 2.471% -0.83%
8 17 up arrow R 1.906% +0.08%
9 7 down arrow PHP 1.590% -1.33%
10 18 up arrow MATLAB 1.569% -0.25%
11 13 up arrow Swift 1.566% -0.57%
12 11 down arrow Objective-C 1.497% -0.83%
13 9 down arrow Assembly language 1.471% -1.07%
14 10 down arrow Perl 1.437% -0.90%
15 12 down arrow Ruby 1.424% -0.72%
16 15 down arrow Delphi/Object Pascal 1.395% -0.55%
17 16 down arrow Go 1.387% -0.55%
18 25 up arrow Scratch 1.374% +0.19%
19 20 up arrow PL/SQL 1.368% -0.13%
20 14 down arrow Visual Basic 1.347% -0.62%

Source : https://www.tiobe.com/tiobe-index/

List of Exercises with Solutions :

[ Want to contribute to Python exercises? Send your code (attached with a .zip file) to us at w3resource[at]yahoo[dot]com. Please avoid copyrighted materials.]