Python for Beginners - Basics to Advanced
4.2 (1,099 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.
73,911 students enrolled

Python for Beginners - Basics to Advanced

Go from Python 3 basics like datatypes to advanced concepts like scraping data from web
4.2 (1,099 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.
73,911 students enrolled
Last updated 2/2020
English
Current price: $13.99 Original price: $19.99 Discount: 30% off
23 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 8 hours on-demand video
  • 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
  • Introduction to Python and Python 3
  • Understand the basics: Data types, Loops, Conditional statements, Functions and Modules
  • Learn object oriented programming in Python
  • Know how to Read and Parse JSON and XML files
  • Learn how to make your own web-scraping tool using Python
Course content
Expand all 41 lectures 07:57:06
+ Introduction & Basics
5 lectures 51:18

Python is one of the fastest-growing programming languages. Let me tell you, learning python is easy.

In this video, we will discuss why you should learn python?.

We will discuss how python is used in different domains.

We will also discuss widely used python libraries in Machine learning, Web development, Big Data processing, Desktop application development, and cloud application development.

If you want to implement your own idea or you are looking out for new opportunities, its time to start the new journey.

Preview 02:09

In this video, we will discuss how to install python 3 on windows. For this course, I will be using Sublime Text 3 IDE to write the scripts. We will see how to download and install sublime text on windows. If you are looking for alternatives for Sublime Text, you can explore PyCharm, Atom, Jupyter Notebook or Spyder. Follow the installation steps with me and feel free to post a comment if you are facing any issues while installing python.

In this video, we will see how to execute the python scripts from the command prompt and Sublime text.

  • Download Links for Windows :

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

          Sublime Text3: https://www.sublimetext.com/3

  • Installing Python on Ubuntu or Linux

          execute the below command from the terminal

          sudo apt-get install python3.6

  • Download Links for Mac:

          Python: https://www.python.org/downloads/mac-osx/

          Sublime Text : https://www.sublimetext.com/3


Preview 06:46

In this video, we will start with basic python syntax. We will discuss how to declare the variables and how to assign the values to the variables. We will discuss how to check the data type of the variable using built-in type() function and how to check the memory location of the variable using id() function. Also, we will go through the concept of Object Entering.

Preview 07:18

In this video, we will quickly go through all the python datatypes. We will discuss how to define integer, float, str, list, tuple, dict and set variables. We will also see what is the mutable and immutable data type. In upcoming videos, we will builtin methods for each data type in detail.

In python everything is an object, we will go through this when we cover Object-Oriented Programming. Stay tuned.


Try it yourself:

  • Declare two integer variables and print multiplication of two numbers

  • Declare a string variable and set the value to "Python is very easy to learn"

  • Declare a list and store the following tasks: "Watch videos", "Attempt Quiz", "Solve Assignment"

  • Declare variable d = {1:"Python",2:"Java",3:"C"} and check the datatype

  • Declare two integers num1 = 500 and num2 = 500 and check if their memory location is same or not

Builtin Python Datatypes
13:43

Like every other programming language, python also provides the set of operators to perform arithmetic and logical calculations. In this video, we will go through python Arithmetic, Logical, Comparison, Assignment, Membership and Identity operators. We will see the difference between == (comparison operator) and is (identity operator). We will see how to use membership operators to check if the element is present in any iterable datatype.


Try it yourself:

  • Check if two strings, s1 = "Python" and s2 = 'python' are equal or not

  • Check if the remainder of 243 divided by 3 is zero

  • Check if "Python" is present in the list programming_languages = ["C","Java","python"]

  • Check if 44 is divisible by 2 and 4 both

  • Declare a variable num1 = 50 and increment the value by 5, decrement the value by 10 and print the answer

Python Operators
21:22
+ Conditional Statements and Loops
5 lectures 40:27

In this video, we will discuss how to write if, elif and else code block to execute the statements only when a certain condition is True and remember any non zero value is True in python. We will discuss the indentation rule in python and how to write an indented block of code. In python indentation error is the most common syntax error, in this video, we will also see how you can resolve the indentation error.


Try it yourself:

  • Check if integer num1 = 45 is even or odd. if even print Even in console else print odd

  • Check if the given list is empty or not. If the list is empty print "List is empty" else print the original list

  • Check if given char = "a" is vowel or consonant.

Conditional Statements | if, elif, else
08:57

In this video, we will discuss how to write the for loop to iterate over a collection of elements and perform certain operations on every element. We will also discuss the built-in range() function to generate a series of numbers.


Practice Problem:

1) Write a Python program that sums all of the first integers, the second integers, and the third integers, outputting the resulting sums all.

if the input is

[2, 5,7]

[3, 6, 10]

[1, 2, -3]

[2, 4, 1]

Then the output should be

[8, 17, 15]


2) v is a list containing numbers. Write Python code to find and print the highest two values in v. If the list contains only one number, print only that number. If the list is empty, print nothing. For example,

v = [ 7, 3, 1, 5, 10, 6 ]

Output l = [7,10]

Iterating using For loop | Syntax
12:14

We discussed the basic syntax of for loop in the last video. In this video, we will discuss how to break out the loop using a break statement, how to jump to the next iteration using continue statement, how to iterate over index and value using enumerate function. In python, we can write the else block for a loop too. We will also go through the use cases of optional else block in this video.


Practice Problem:

1) Write a program, which will find all such numbers between 1000 and 3000 (both included) such that each digit of the number is an even number.

Iterating using For loop | Continue | Break | enumerate
12:17

In this video, we will see basic syntax of writing while loop to iterate until a certain condition is True. We will discuss defining initialization, condition, and increment for while loop. Same as for loop, we can write optional else block for a while loop. In this video, we will also discuss use cases of writing optional else block in while loop.


Try it yourself:

  • Write a program to calculate sum all even numbers between 10 to 20 both inclusive

  • Write a program to check "Python" is present in the list ["Python","C","Java","Ruby"] using linear search

  • Write a program to print 3 vowels from string "Learning Python is super easy"

  • Write a program to add element in a list till sum becomes <= 100

Iterating using While Loop | Syntax
03:43

Python coding assignment 1 on conditional and looping statements.

Python Assignment - 1 | Conditional and Looping Statements
03:16
+ Python Data Types - String, Lists, Tuple, Dictionaries
9 lectures 01:56:17

In this, we will take a closer look at python str data type. We will see different ways to define the strings in python. Stings is an ordered sequence of character which support indexing and slicing. We will see how to access individual characters using left to right index and right to left index. We will see how to get a substring from a string without using loops i.e. slicing. Also how to iterate over a string using loops.

Str Data Type | Indexing | Slicing | Striding - Closer look at python data types
13:08

In this video, we will discuss the built-in functions for str data type. The functions like split, format, find, replace, translate, isdigit, strip will help to write the python code in a much cleaner way. Also, we will see how to get a list of all builtin functions using dir function and how to use help to understand the usage of any built-in function.


Practice Problem:

1) Write a program that will accept a string of characters and should find the highest occurrence of the character and display it.

For example if input is "aaaaaaaaaaaaaaaaabbbbcddddeeeeee" it should return "a".

Str Data Type | Built-in functions - Closer look at python data types
24:03

In this video, we will discuss how to define a list in python. Concept of indexing and slicing in list. We will also discuss the built-in methods to add the elements to the list.


Practice Problem on Data Type :

1 ) Write a program that takes two di?erent lists, and returns the smallest value that appears in both lists.

For example, given the lists l1,l2,l3

l1 = [ 1, 3, 8, 12, 12, 15, 20 ]

l2 = [ 7, 9, 10, 11, 15, 30, 35 ]

l3 = [ 2, 4, 5, 13, 16, 17, 23, 25 ]

then

print smallest_in_common(l1,l2) # should output 15

print smallest_in_common(l1,l3) # should output None


2) Write Python code that takes a list of numbers, and outputs the positive values that are in v in increasing order, If there are no positive values, then the output should be None.

For example, l = [ 17, -5, 15, -3, 12, -5, 0, 12, 22, -1 ]

Then the output of your code should be

[12,12,15,17,22]

List Data Type | Indexing | Slicing | Append - Extend - Insert - Closer look at
13:36

In this video we will discuss the built in methods to perform update and delete operations on list. We will discuss the difference between pop() and remove() function. We will also discuss methods to sort the list using builtin function.

List Data Type | Update and Delete Operations - Closer look at python data types
08:35

In this video, we will discuss how to define tuple and how to perform indexing & slicing on the tuple. We will also discuss the difference in tuple and list data type.


Practice Problem:

1) Consider a data, where just the name of the restaurant, the type of restaurant, and the ratings are provided.

For example :

restaurants = [ [ Acme, Italian, 2, 4, 3, 5],[ Flintstones, Steak, 5, 2, 4, 3, 3, 4],[ Bella Troy, Italian, 1, 4, 5] ]

Write a segment of Python code that prints all Italian restaurants in the restaurants' list that have no ratings of value 1 and at least one rating of value 5


2)Write a program to read elements in a matrix and check whether the matrix is an Identity matrix or not

The identity matrix is a special square matrix whose diagonal elements are equal to 1 and other elements are 0.


Input elements in matrix:

[[1 0 0],

[0 1 0],

[0 0 1]]

Output

It is an Identity matrix

Tuple Data Type - Closer look at python data types
06:14

In this video, we will discuss to create and access values from dictionaries. We will discuss why the performance of dictionaries is better than list. Also how dictionaries are stored.


Practice Problems:

1) Given a dictionary that associates the names of states with a list of the names of cities that appear in it,

write a program that creates a new dictionary that associates the name of a city with the list of states that it appears in.

As an example, if the first dictionary is


states = {'New Hampshire': ['Concord', 'Hanover'],

'Massachusetts': ['Boston', 'Concord', 'Springfield']

,'Illinois': ['Chicago', 'Springfield', 'Peoria']}


cities = {'Hanover': ['New Hampshire'],

'Chicago': ['Illinois'],'Boston': ['Massachusetts'],

'Peoria': ['Illinois'],'Concord': ['New Hampshire', 'Massachusetts'],Springfield': ['Massachusetts', 'Illinois']}

Dictionary Data Type | Storing and Accessing the data in dictionaries
14:31

In this video, we will discuss the built-in methods to update and delete the key & value pair from a dictionary. We will also discuss methods to merge two dictionaries and methods to create a dictionary from lists.


Practice Problems on Python Data Types:

1) Given a list of test scores, where the maximum score is 100, write code that prints the number of scores that are in the range 0-9, 10-19, 20-29, ... 80-89, 90-100. For example, given the list of scores

[ 12, 90, 100, 52, 56, 76, 92, 83, 39, 77, 73, 70, 80 ]

The output should be :

(0,9): 0, (10,19): 1, (20,29): 0, (30,39): 1, (40,49): 0, (50,59): 2, (60,69): 0, (70,79): 4, (80,89): 2, (90,100): 3

Dictionary Data Type | Update and Delete Operations
06:11

Set data type provides methods to work with unique values. In this video, we will discuss built-in methods like union, intersection, difference, the symmetric difference to get unique elements from sets. We will also discuss how to convert lists into sets and vice versa.

Set Data Type | Add - Update - Delete operations
16:00

In this video we will first discuss the builtin mathematical function present in __builtins__ module then we will go through the functions provided by Math module. We will discuss how to import a Math module and how to use functions like sqrt(), factorial(), modf(), floor(), log() and sin(). We will also discuss the important functions from Random module to generate integer and floating point random numbers.

Working with Math and Random Modules | Math functions | Random Number Generator
13:59
+ Python Functions
4 lectures 50:49

In this video, we will discuss how to define user-defined functions using def keyword and how to pass arguments to the functions.

Getting Started with User Defined Functions
08:43

In the last video, we discussed the syntax for defining user-defined functions. In this video, we will discuss the different ways of passing values to a function. We will go through the positional, default and keyword argument passing techniques with the help of multiple examples.

Parameter Passing Techniques | Positional - Default - Keyword Parameters
18:31

In the last video, we discussed positional, default and keyword parameter passing technique. In this video, we will discuss variable-length positional and variable-length keyword parameter passing techniques. Using variable-length parameter techniques you can pass any number of parameters to a function and python will pack all the arguments in tuple and dict for variable-length positional and for variable-length keywords respectively.

Parameter Passing Techniques | Variable Length Positional and Keyword Parameters
08:17

A function that calls itself is called a recursive function. In this video, we will discuss how to write recursive functions in python. In this video, we will also discuss the Binary Search algorithm using a recursive approach.

Writing Recursive Functions
15:18
+ Python Modules and Packages
3 lectures 34:27

Every .py file is a module in python. You can access the function defined in one module in another module using import statements. In this video, we will discuss how can we access the binary search created in the last video in another module. In this video, we will also discuss how we can create a helper function for your module.

Creating Modules and Packages
08:29

A regular expression is a sequence of characters that define a search pattern mainly used for pattern validation and data extraction based on the pattern. In this video, we will discuss the regex meta character and python re module methods to create a regular expression.

Introduction to RE Module | Regx Meta-characters
14:10

In this video, we will discuss how to group the regular expressions and retrieve the data from matched groups. We will also go through Search and Match methods of re modules.

RE Module | Groups
11:48
+ Functional Programming
4 lectures 52:05

List comprehension provides a short and concise way to create lists from other sequences. It consists of square brackets containing an expression followed by a 'for' clause, then zero or more 'for' or 'if' clauses. In this video, we will discuss to create lists using list comprehension with multiple examples.

List Comprehension - Dict Comprehension
14:33

In this video, we will discuss how to use map() and filter() function to perform similar operations on each element of the sequence. We will also discuss how to improve the performance of map() and filter() function using anonymous lambda function.

Functional Programming | Map - Filter - Lambda
13:30

Generator functions allow you to declare a function that behaves like an iterator. Generators are best for calculating large sets of results without allocating the memory for all results at the same time. In this video, we will discuss how to create generator functions and how to iterate over it using next() function.

Function Iterators | Generator functions
10:25

An object which support __iter__ and __next__ method is an iterator. iterator allows to work with infinite sequences without allocating memory for the entire sequence at same time. In this we will discuss how to user iterators and how to create iterators using itertools module. We will discuss iterators like chain, count , cycle, repeat, permutations and combinations.

Iterators and Itertools
13:37
+ File Operation | JSON, XML Parsing
4 lectures 44:10

In this video, we will discuss how to read a text file using python. We will also discuss the methods like read, readlines and readline

Getting started with file operations
09:26

In this video we will discuss about read, write and append mode

File Operations | Read - Write - Append
18:32

In this video, we will discuss how to parse JSON files using JSON module. We will discuss serialization and deserialization using dumps and loads method.

Parsing JSON files using Python
10:27

In this video we will discuss how to parse XML files using xmltodict module. We will discuss how to convert xml to python objects and vice versa.

Parsing XML files using xmltodict
05:45
+ Object Oriented Programming
3 lectures 48:14

In this video we will go through the basics of object oriented programming. We will discuss how to create classes and object in python. Also, how to define attributes and methods in class. We will also discuss how to initialize the object to particular state using __init__() method.

Introduction to Object Oriented Programming
21:15

In the last video we discussed how to define classes and object in python. In this video we will discuss how to define class variables and class methods to work with class variables. We will also discuss how to define static methods.

Object Oriented Programming - Class Method and Static Method
12:18

In this video, we will discuss how to implement inheritance in python. We will discuss how python supports multiple inheritance using method resolution order. Also, about method overriding concept.

Object Oriented Programming - Inheritance
14:41
+ Web Scraping and Database handling using Python
2 lectures 27:10

Web Scraping is a technique to extract large amounts of data from websites, which can be used further for analysis purpose . BeautifulSoup and Scrapy are the most widely used libraries for scraping the data from web. In this video we will discuss how to scrap the data from magicbricks.com using functions of BeautifulSoup module.

Web Scraping using BeautifulSoup
16:44

In this video we will discuss how to perform Create, Update and Delete operations on SQLite database. We will discuss how to execute the database queries using execute() method.

Executing Database Queries Using Python | sqlite3 Module
10:26
+ Python Decorators
2 lectures 12:09

In this video we will discuss about decorators in python

Python Decorators
07:07

Time to validate your understanding of python through this simple quiz.

Don't forget to post your score in the Q&A section below.

All the best!

Python Quiz
05:02
Requirements
  • Basic problem solving skills
  • Knowledge of any programming language will be an add-on
Description

Python is an interpreted, object-oriented, high-level programming language. It is an open source programming language with more than 1 million libraries and more than 100,000 active contributors. Python is also known for its simplicity as compared to other programming languages. Be it Artificial Intelligence or Web Development or IoT or Big Data Analysis or Cloud Application Development or Automation domain you can find n number of use cases for Python.


In this course, we will start with Python Installation and few basics of Python. Along the journey, we will discuss all the python data types and built-in methods in depth. We will discuss User-defined functions, different parameter passing techniques and object oriented programming concepts in Python. Further, we will discuss the must know concepts for python programmers like list comprehension, map function, filter Function, generators, iterators and itertools. We will also cover web scraping using beautifulSoup, multi threading and database access.

Once you reach here you can start the new journey to learn domain-specific python libraries like NumPy, Pandas, Matplotlib, Scikit-learn, tensorflow, keras for machine learning. Django, flask for web development. pySpark for big data processing and many more...

Wish you the best for your python journey.


For more such FREE courses visit official EdYoda Website.

Who this course is for:
  • Beginners looking to get started with Python Programming
  • Beginners who want to be a Python Developer
  • Beginner Python Developers curious about Web Scraping
  • Developers who wish to master Python