10-11-2021 #PythonProgramming

What Next

Sonam Wangchu (ICT Teacher) | 1170

Back story
This article is an attempt to provide direction to our students who would like to explore Python programming further. So that they don’t waste their time trying out all the resources and tools. I have discussed some of the libraries and frameworks in Python used to develop applications for different platforms.

The students have begun learning to code using Turtle graphics in the Python programming language. They have learned how to move and draw, control the pen, control windows and input text. Besides, they have also learnt concepts like variables, data types, control statements, loops, list, tuple, dictionary and function. Using those concepts they were able to create graphics of various complexities.

There are more concepts, libraries and frameworks to be learnt in Python. Some of these components will be covered in next grade. However, current class 12 and some other students may not get the opportunity. So I take the moral responsibility to at least show the way forward to those interested in programming. Above all, these students have spent a good two years and a lot of effort in learning Python Programming.

In order for them to learn to develop simple 2D games using Turtle graphics, they will have to explore concepts like animation control, special methods and event handling. These concepts will help to create games controlled through a keyboard or a mouse. And the fundamentals knowledge of the core Python programming would be enough to develop those types of games.

We have almost covered all parts of the Python procedural programming. A procedural programming is a step by step writing of a code which includes functions and executes the code from top to bottom. Procedural programming languages are easy to learn for the beginners. However, there is another style of programming called Object Oriented Programming.

Object oriented programming uses objects and classes. This style of programming is more powerful than procedural programming. OOP is preferred by the software developers owing to its power and flexibility. If you have exposure to procedural programming in Python then learning OOP should not be a problem. Mastering OOP in Python would help to understand and use Python frameworks and libraries.

Python is being used in many fields owing to its popularity. It is used for Data science, GUI development, Web development, Web scraping, Mobile development, Game development, Embedded system, Artificial Intelligence, and many more. These are some of the areas in which I have explored.

Data Science

The prerequisite to learning data science requires a strong foundation in statistics. You can apply the concepts on statistics that you have learned in mathematics in data science. The Python community provides a lot of tools to compute, clean data and visualize the insight from a dataset.

NumPy is a Python library that arranges the raw datasets into multi dimensional arrays, does mathematical computations efficiently and is specially designed to process large volumes of data. This is one necessary library a data scientist needs to master.

When there is a large volume of data, there would be instances where it needs to be cleaned. Some data would be missing, incorrect, duplicate, inconsistent or many other reasons. In order to address this problem Python provides another library called PANDAS. It is used for cleaning the data, reshaping the datasets, merging, slicing etc.

MatPlotLib is a Python library that is used for data-visualization. It makes plotting of data in any format of charts with flexibility. Since it is based on code, the way the data is represented depends on the creativity of the programmers.

These Python libraries work in tandem. First NumPy arranges the datasets, PANDAS cleans the dataset and finally MatPlotLib is used to visualize the data in the form of charts. However these are only a few Python libraries used for Data Science.

Graphical User Interface Base Application

I first learned to create GUI based applications by using tkinter. Tkinter is the standard Python interface to the Tk GUI toolkit. It makes it possible to add buttons, textboxes, screen windows, images and a host of other components needed to create a good user interface. It takes care of the user interface and the core Python takes care of the business logic. Tkinter is usually installed along when the Python bundle is installed.

Web Development

I tried my hand at creating web development using django. Every component is a separate app so that it can be reused in other projects as well. Django generates the admin panel dynamically as soon as the database is created. In order to learn this framework I had to invest a lot of time and effort. By the way, there are many other web development frameworks in Python.

There are other necessary technologies we need to learn to build a website besides the web framework. HTML for the markup language. CSS for styling the user interface. Javascript to make the web pages dynamic. One also needs to learn the science behind the database design. SQLite is the standard Python database that comes with the Python bundle.

Web Scraping

Web scraping is the technique to extract data from websites. Suppose you want to create a website that pulls and displays the news articles from Kuensel and The Bhutanese, you can use web scraping to automate the task.

Beautiful Soup is a Python library that can be used to extract data from HTML and XML files. You need to install it since it’s not included in the standard Python bundle. Again there are many web scraping Python libraries available.

Mobile Development

I came across Kivy while exploring the Python framework for mobile development. Kivy is a library used to develop applications which are cross platform. Cross platform means the application created using Kivy can run on Windows, Mac, Linux, IOS, Android and other platforms. It is relevant to mobile development because it supports multitouch events.

Initially I thought Kivy to be used only in mobile applications development however I found out that it is more than that. Kivy is used to create desktop applications and game development too. I strongly recommend exploring Kivy.

Game Development

If you want to develop a 2D game then Pygame is a good option, especially for the beginners. It does not come with the default Python bundle. It provides more features compared to the Turtle graphics.

Disclaimer

In no way do I claim to be the experts in any of the framework or the library. I have just explored those libraries and frameworks over the years. I am sharing this with the readers, particularly my students, in the hope of guiding them. I also admit that I have forgotten some of the frameworks and libraries. This is what happens when you do not keep in touch on a regular basis. So I recommend you set aside time daily for coding.

Social Media
facebook
Navigation links
Home | Blog | Faculty
Samtse Higher Secondary School
975-5-365622
samtsehss@education.gov.bt
Made in Bhutan