Python programming for C++ developers
5.0 (3 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
15 students enrolled

Python programming for C++ developers

A quick switch from C++ to Python
5.0 (3 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
15 students enrolled
Created by Basit Ali
Last updated 5/2020
English [Auto]
Current price: $51.99 Original price: $74.99 Discount: 31% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 6.5 hours on-demand video
  • 7 articles
  • 7 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • A quick introduction to python syntax. Variables, data handling, lists, functions, loops, conditions, input, output, file handling, recursion, exception handling, GUI programming and more.
Course content
Expand all 59 lectures 06:17:03
+ Introduction
4 lectures 10:02

This section contains the introduction to the instructor and the course, best practices to make most out of this course.

Best Practices:

  • Watch the video lectures

  • Then attempt the exercises

  • Take self evaluation quizzes

Preview 01:01

This is a very quick walk through the whole course. We list down what this course is all about, the main topics covered and what is cool in terms of syntax about Python.

Preview 03:58

Why to study python and how do we get started.

We will use idle as our IDE for this course. You can download python IDE from following link for Windows or Mac.

Software Setup for Python

Time to write you "Hello World" program in Python. Yes your first few lines of code.

The code will actually pull up a GUI saying Hello World :)

Hello World, your first program
+ Getting Started
5 lectures 13:21

Introduction to the section. We are ready to start writing python shell commands.

Preview 00:18

This section is an introduction to your python shell. We will write a few commands and start getting used to how the shell behaves when you give commands. Entering literals can give you literals back and if you ask for some calculation, it is performed and the result is printed. We play with a few numbers and strings on the console here.

Preview 03:28

Handling data types in python as compared to C++, how to declare and use these numbers and string items in python shell. We also get started with some arithmetic operators in this section as well.

Preview 06:40

In this section we start working with variables in python. We will have another lecture related to variables later but we start working with them and using them now.

Working with variables

Please click on the star on top left (that's where it was last i checked) and rate the course. Your rating helps other students to decide whether to sign up for the course or not.

Please rate the course
+ Working with data and numbers
5 lectures 25:45

This lecture is all about operators. You'll to learn and use following operators

  • Addition

  • Subtraction

  • Multiplication

  • Division

  • Integer Division

  • Modulo (remainder)

  • Raised to power

  • Left shift

  • Right shift

  • And

  • Or

  • Xor

  • Not

Obviously this cannot be done without knowing a bit of binary numbers. We also talk about overflow and underflow as well if-any in python.

Arithmetic operators and precedence - Part 1

We continue our discussion for previous section, especially about shift operations, xor, not and eventually how to represent negative numbers in python. Yes we do talk about 2's complement in this section as well.

Arithmetic operators and precedence - Part 2

In this lecture we talk about how comparison operators work in python as compared to C++. We talk about following operators

  • Less than

  • Less than and equal to

  • Greater than

  • Greater than and equal to

  • Equal to

  • Not Equal

  • Not

Comparison operators, Less than, Greater Than, Equal to etc

In this section we start by discussing following logical keywords:

  • and

  • or

Also we talk about operator precedence, do some examples and exercise which operator will be calculated first in a statement or expression.

Binary number and logical operators
Exercise - Command line practice of numbers, operators and strings.
Quiz - Operators
10 questions
+ Programs and Problem Solving
8 lectures 36:18

Rating the course is a good idea as it will help other students from Udemy community decide if they want to subscribe to this course or not. It'll take just a second, please rate the course if you haven't already.

Please rate the course if you haven't already

We start making multi instruction programs in this section. This video introduces you to the content of this section.

Introduction to Programs and Problem Solving

This lecture teaches you how to write your first python file. The python files are saved with .py extensions and you can write multi-line code in python files. How to and where to write this code, how to save this as .py file, how to compile and how to run this course are the main things we discuss in this video.

Introduction to Multi-line programs - the .py files

We take a detailed dive into the world of variables in this video. We will talk about how variables are declared and used in C++ and how it is different to declare and use variables in Python. We also talk about the naming rules of variables and what are legal and illegal variable names.

Variables and naming rules

This is a quick video talking about how to comment inside your .py files. Comments are pieces of text that you want the compiler to ignore while compiling your code. We also compare how comments work in C++ and how in contrast they work in Python.

Comments in Python

We start by talking about assignment operator and how to assign different values to variables in this section. Then we learn how we use and exercise operator like







and we learn how self assignment works.

Assignment operator and self-assignment

We take input from keyboard and use the input in different programs. The data user enters using the keyboard is obviously received as text and then we use that text in different parts of our program.

Taking user input

Type casting is the process of converting one data type to another. So a variable of one data type is converted to another data type if the program requires you to do so. For example if you take a number input from the user, the default data type of input is text and the number is actually a set of digits in a string. You type cast it to an integer or float to make it usable for calculations in the program.

In this section we see how we do type casting.

Type Casting - converting data types
Quiz - Input / Output
5 questions
+ Conditions in Python
5 lectures 20:53
Introduction to control statements and if condition

In this section we see how if condition works in python and how it's syntax is different from other languages.

Control Statement - if condition

This section includes a few examples of Python if-else blocks and how it can be used to solve simple problems. For every example we also present same condition in C++ for easy learning.

A few examples of if condition

No we add *else*, the otherwise section to the if condition to make full sense of your Python program. We do not use any curly brackets in any blocks hence in Python we will have if block and else block both without curly brackets.

if - else , using else with conditions
Homework Exercise 2
Quiz 2 - Conditions
4 questions
+ Loops in Python - Control Statements continue
4 lectures 39:21

When it comes to repeating code, loops are here for your rescue, but loops need to be used carefully with proper loop invariant to make sure the condition goes false and we eventually come out of the loop, otherwise the code will run for ever and the users will think the program got stuck. We will cover while loop and for loop in this section. 

Introduction to loops

Time to work on while loop. With concentration on comparison between while loops in Python and C++, we will solve a few example problems and see how the programs work using loop. We also work on an approximate algorithm to calculate square root of a number using loops.

Working with While loops

When you have a counter or a loop invariant in a loop that increments or decrements every time the loop runs, it is a good idea to use a for loop instead of a while loop. Syntax of for loop is slightly different in python but it still works the same way. Let's see how for loops work in Python.

For loops
Loops Quiz
4 questions
Coding Exercises and Homework
+ Functions in Python
6 lectures 37:37

Functions are reusable pieces of code, put into different modules, shared with other programmers, called from different programs, packed in different libraries and objects, passed different parameters and may or may not return a value. It happens in all programming languages, so it happens in Python as well. Let's check out how functions are coded in Python.

Introducing functions in python

We learn here how to write functions in Python. How it is different from C++ functions. How to pass parameters, return numbers and how to call functions.

Creating and using functions in Python

We build on top of our knowledge of writing functions in Python and go through a number of examples. Learning these examples will help you do the exercises at the end of this section as well.

A few examples of functions

This section tells you how you can use more than one code files in python. We will make a few functions, put them in another .py file and then use that py file by importing it into my main program. This is pretty much similar to using header files in C++ but instead of #include we use import here.

This import mechanism not only helps us organize the code, makes those files re-usable in my own code as well as allows me to share code with other programmers as well.

Creating libraries - Using multiple .py files

We do a full example of a simple importable .py file in this section. Don't miss this.

A multiple python files example
Exercises/Homework for functions
Quizzes - Functions
4 questions
+ Lists in Python
6 lectures 57:14

In this section we will learn how to make and use lists in python. Lists allow you to group a number of objects together for better handling and management of data and obviously to solve larger problems. These lists actually make the basis of some advance topics if you want to pursue them later for example data science, machine learning, even artificial intelligence. It all starts with the lists.

Introducing Lists

Lists in python are a set of objects tied together. You can make lists of integers, floats, boolean variables or other objects and even mixed data type as well. This section explains how to make simple numerical or string based lists, how to set variables, how to access them, print them and use them.

Creating and Using Lists

Something that we cannot do in C++ lists, we will be inserting elements right int he middle or at the end of the Python lists in this section. We will see how we can change a list to meet the requirement of our program by using built in functions for handling lists.

Accessing, Updating and Inserting list items

We can even arrange and sort lists, whether the lists are numerical or text based objects, the data is sorted both in ascending and descending order by using built in fictions. We can also grow, shrink, merge and divide existing lists into sub lists very easily in Python. Let's see how it is done in this lecture.

More about Lists, Sorting, Merging, Sublists etc

Lists of lists - aka - 2 dimensional lists are a very good tool to handle tabular data. Any data table with rows and columns can be considered a 2 dimensional list and data can be loaded in the memory using list-of-lists. We will discuss this in this lecture how to make these tabular 2 dimensional lists in Python, how to access these members, how to edit and update data, how to access full rows of data and so on.

Lists of Lists - that is 2 dimensional lists
Homework/Exercises for Lists in Python
Self Evaluation Quiz - Lists
7 questions
+ More Data Structures - Tuples, Dictionaries and Sets
2 lectures 07:46

In this section we will explore three more data structures, other than the lists. We will check out tuples, dictionaries and sets.

Section Introduction

In addition to lists we will also learn about tuples, sets and dictionaries.


Tuples are necessary read only lists, the lists in which we cannot edit objects, nor we can insert or append objects.


Dictionaries are actually key value payers.

We have a list of data item and every data item has a name (or a key). To read or write to a value, you must tell which key you are righting. There's no limit on the size of the dictionary. Keys are unique but values can be duplicate.


This is just like our set theory sets as we learned in mathematics. The items of sets cannot be duplicate as it is against the definition of sets. We can apply set operations like union, intersection, difference etc with sets.

Tuples, Dictionaries and Sets
+ Handling Files with Python
5 lectures 55:52

Whenever a program is done calculations on data, it is saved in a file. Saving data is an essential part of computer programs. In this section we will discuss how to create files, open files, write to files, read from files, delete files, edit files etc.

Filing introduction

In this lecture we discuss how to open a file in python. How to open a file for reading, for writing and for editing. We start by writing a few basic messages in a text file using python code keeping an eye on the comparison with C++ code.

Opening, Reading and Writing to files

In this section we will go through a few examples related to files. We will write and read files line by line. We will try to read and write portions of files. We will edit files and we will also try to save a table of records separated by delimiters in a text file as well. This is a beginning of you writing your first database table to the file.

A few file handling examples

Time to go read, write and update a Microsoft Excel worksheet? Well yeah, we use a csv format to load, view, edit and update the data worksheets in python. A very interesting example to handle files.

Reading and Editing CSV files (Example)
Quiz - Filing
4 questions
Homework/Exercises for File reading/writing
  • C++
  • If not C++, preferably another similar syntax language like Java or C#

The course is designed for C++ developers to quickly grasp Python syntax. We will learn Python syntax and a comparitive study is done in each lecture comparing C++ and python syntax.

The course gives you a boost in learning python without going through clumsy documentation or lengthy books. The pace of the course is quick, so that you don't get bored with extra ordinary details but it is balanced with the depth of information that you are not left out on any topics.

Who this course is for:
  • Programmers, those who know C++. This is not a beginner's course if you don't know programming already, may be this one is not for you.
  • C++ experts looking to quickly grasp Python