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
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.


https://www.python.org/downloads/


Software Setup for Python
03:26

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
01:37
+ 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
02:34

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
00:21
+ 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
13:58

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
06:12

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
01:42

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
03:47
Exercise - Command line practice of numbers, operators and strings.
00:06
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
00:23

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
00:30

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
06:56

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
04:39

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
02:03

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
10:16

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
05:54

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
05:37
Quiz - Input / Output
5 questions
+ Conditions in Python
5 lectures 20:53
Introduction to control statements and if condition
00:31

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
04:01

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
07:14

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
09:02
Homework Exercise 2
00:05
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
00:44

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
15:06

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
23:27
Loops Quiz
4 questions
Coding Exercises and Homework
00:04
+ 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
00:42

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
15:45

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
11:55

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
03:58

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

A multiple python files example
05:16
Exercises/Homework for functions
00:01
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
00:43

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
06:19

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
10:34

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
20:47

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
18:49
Homework/Exercises for Lists in Python
00:02
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
00:36

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


Tuples

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

Dictionaries

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.

Sets

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
07:10
+ 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
00:43

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
16:31

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
19:46

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)
18:46
Quiz - Filing
4 questions
Homework/Exercises for File reading/writing
00:06
Requirements
  • C++
  • If not C++, preferably another similar syntax language like Java or C#
Description

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