Python

A simple and powerful programming language

Beginner
9 hrs 24 mins
34 chapters

Overview

Python is a high-level, interpreted, general-purpose programming language that powers both web and desktop platforms. It supports multiple paradigms of coding including object-oriented, procedular, functional and imperative.

It's an extremely popular programming language on the charts, capable of being used in very sophisticated fields such as data science, machine learning, AI, and web development.

It's extremely easy to use and has a very gentle learning curve. If you start today, you'll be able to develop some rigorous programs in lesser than a week!

Python favours code readability via the offside rule — where a block of code is represented by an increased level of indentation as opposed to delimiters such as {} (curly braces) used in languages such as JavaScript, PHP, C++ etc — which newbie developers find really convenient.

Moreover, the language offers a huge standard library to accomplish nearly any task one can think of. This is the reason why Python is referred to as a 'batteries-included' language. There are numerous extensions and packages also available that can really power up this already-powerful beast. We can develop GUIs; perform complex mathematical analysis; visualise data using graphs; process files; query databases; manipulate images; you name it!.

Python has a large developer community which actively works on the language making it even more amazing with every new update. If you would like to learn a programming language, make sure that Python is in your arsenal of skills!

Prerequisites

No special prerequisites for this course.

Learning outcomes

This course aims at making you fluent with Python and able to code like a real Pythonista. It introduces to many aspects of Python, answers many common questions and puts you at the forefront in developing real-world Python programs.

Being specific, at the end of this course you will know:

  1. How to set up Python on a computer from scratch.
  2. How to write you first program in Python, printing the string 'Hello World'.
  3. What are IDEs, and which Python IDE works best for a given application.
  4. The basics of the language, including things such as printing stuff, receiving user input, doing math with numbers, working with variables and so on.
  5. The most common data types of Python — integers, floats, Booleans, strings, lists, tuples, sets and dictionaries — and how to use all of them in a program.
  6. What is code commenting and how to effectively comment out pieces of code.
  7. How to use control-flow statements; such as if, elif, else to make selection-based execution; and while and for to make iteration-based execution.
  8. The concept of functions and how to use them to group a block of code under a given name.
  9. How to work with Python numbers — in particular, the basics of numbers, the int and float classes, how to round numbers, generate pseudo-random numbers, and operate on different number systems including binary, hexadecimal and octal.
  10. The str data class in detail, in particular you'll have knowledge on how to create strings; process strings using str methods; what are raw strings; and so on.
  11. The if, elif and else statements, and how they enable selection-based execution of code, by means of checking a condition and proceeding likewise.
  12. How to work with Python lists; specifically, how to create lists; use the concept of mutability; add/remove elements from a list; sort lists perform a bunch of operations on list using list methods.
  13. How to work with Python sets, in particular the set class. You'll be able to create a set; add/remove elements from a set; and most importantly, perform common operations on sets such as union, intersection, difference, superset and subset checks, and much more.
  14. The dict class in Python to create dictionaries — a collection of key-value pairs. You'll know what are dictionary views and how to process items using numerous dictionary methods.

Table of contents

  1. Programs can't be cool if the user can't control their flow. In this unit, we explore how to control execution in our Python programs using selection statements — if, elif and else; and using loop statements — for and while.

  2. Here, we see how to work with the most commonly used immutable sequence type in Python — the list class. We start by getting a hands-on experience of lists, before moving on to explore list comprehensions — a superbly quick way to define lists — and list methods. Finally, we end the unit with a detailed chapter on list sorting.

  3. In this unit, we get familiar to one of the most interesting data types in Python — sets. We see how to create sets; perform operations on them such as intersection, union; how to check for subsets, supersets and much more. Lastly, we explore methods of the set class that enable many functionalities on Python sets.

  4. In this unit, we get introduced to dictionaries in Python that can store data with given names. We see how to create dictionaries; when to create them; how to use dictionary views to retrieve given information from a dictionary; a bunch of methods of the dict class and so on and so forth.

  5. In this unit, we introduce ourselves to functions in Python. Out of the box, Python comes with numerous built-in functions to aid in common tasks such as sorting, arithmetic, string manipulation and much more. Here, we explore how functions work and how can we create our own functions. We also learn concepts such as code objects and closures. Lastly we explore lambda functions.

FAQs

If you're having a hard time understanding a given concept in the course, feel free to reach out to me at bilal@codeguage.com, describing the issue you're facing. I'll try my level best to help you out.

The courses on Codeguage are released while they are still under construction so that learners can get early previews. As I continuously work on adding more and more content to the courses, if a given topic isn't covered today, there's a high chance that it's already under way and will show up very soon. You can follow Codeguage on Twitter to be updated with all the latest content releases.

Write to me at bilal@codeguage.com.

Let's get learning!

Start learning

Recent courses

Pre-release

Node.js

A runtime environment executing JavaScript outside the browser