Bluss Academy

Python Programming Level 1

Python is a programming language. Like other languages, it gives us a way to communicate ideas. In the case of a programming language, these ideas are “commands” that people use to communicate with a computer! In this course, we shall cover the fundamentals of the Python programming language.

About this Course

1
Introduction

Overview

This is a complete beginner Python course and it covers the fundamental constructs of the Python programming language. In this course, we shall cover the basics of the Python syntax and also attempt some challenges that will help us grasp the concepts.

Python Syntax

1
Comments

In this module, we cover common language constructs like comments, functions, variables, error handling, etc.

2
Arithmetic operations

Python supports different types of arithmetic operations that can be performed on literal numbers, variables, or some combination.

3
Plus-Equals operator +=

The plus-equals operator += provides a convenient way to add value to an existing variable and assign the new value back to the same variable.

4
Variables

A variable is used to store data that will be used by the program. This data can be a number, a string, a Boolean, a list or some other data type.

5
Modulo operator %

A modulo calculation returns the remainder of a division between the first and second number.

6
Integers

An integer is a number that can be written without a fractional part (no decimal). An integer can be a positive number, a negative number or the number 0 so long as there is no decimal portion.

7
String concatenation

Python supports the joining (concatenation) of strings together using the + operator. The + operator is also used for mathematical addition operations. 

8
Errors

The Python interpreter will report errors present in your code.

9
Division by zero

A ZeroDivisionError is reported by the Python interpreter when it detects a division operation is being performed and the denominator (bottom number) is 0.

10
Strings

A string is a sequence of characters (letters, numbers, whitespace or punctuation) enclosed by quotation marks. It can be enclosed using either the double quotation mark " or the single quotation mark '.

11
Syntax errors

A SyntaxError is reported by the Python interpreter when some portion of the code is incorrect.

12
Name error

A NameError is reported by the Python interpreter when it detects a variable that is unknown.

13
Floating point numbers

Python variables can be assigned to different types of data. One supported data type is the floating-point number. A floating-point number is a value that contains a decimal portion. It can be used to represent numbers that have fractional quantities. 

14
print() function

The print() function is used to output text, numbers, or other printable information to the console.

Functions Parameters

1
Functions Parameters

Sometimes functions require input to provide data for their code. This input is defined using parameters.

2
Multiple Functions

Python functions can have multiple parameters.

3
Functions

Some tasks need to be performed multiple times within a program.

4
Function Indentations

Python uses indentation to identify blocks of code.

5
Calling Function

Python uses simple syntax to use, invoke, or call a preexisting function.

6
Function Keyword Arguments

Python functions can be defined with named arguments which may have default values provided.

7
Returning Multiple Values

Python functions are able to return multiple values using one return statement.

8
The Scope of Variables

In Python, a variable defined inside a function is called a local variable.

9
Global Variables

A variable that is defined outside of a function is called a global variable.

10
Parameters and Local Variables

Function parameters behave identically to a function’s local variables. They are initialized with the values passed into the function when it was called. Like local variables, parameters cannot be referenced from outside the scope of the function.

Control Flow

1
elif Statement

The Python elif statement allows for continued checks to be performed after an initial if statement. An elif statement differs from the else statement because another expression is provided to be checked, just as with the initial if statement.

2
Handling exceptions in Python

A try and except block can be used to handle error in code block. Code which may raise an error can be written in the try block.

3
or operator

The Python or operator combines two Boolean expressions and evaluates to True if at least one of the expressions returns True. Otherwise, if both expressions are False, then the entire expression evaluates to False.

4
Equal operator ==

The equal operator, ==, is used to compare two values, variables or expressions to determine if they are the same.

If the values being compared are the same, the operator returns True, otherwise, it returns False.

5
Not Equals operator !=

The Python not equals operator, !=, is used to compare two values, variables or expressions to determine if they are NOT the same. If they are NOT the same, the operator returns True. If they are the same, then it returns False.

6
if Statement

The Python if statement is used to determine the execution of code based on the evaluation of a Boolean expression.

7
else Statement

The Python else statement provides alternate code to execute if the expression in an if statement evaluates to False.

8
and operator

The Python and operator performs a Boolean comparison between two Boolean values, variables, or expressions. If both sides of the operator evaluate to True then the and operator returns True. 

9
Boolean values

Booleans are a data type in Python, much like integers, floats, and strings. However, booleans only have two values:

  • True
  • False
10
not operator

The Python Boolean not operator is used in a Boolean expression in order to evaluate the expression to its inverse value.

Lists

1
Lists
2
Adding Lists together
3
List method .append()
4
Aggregating iterables using zip()
5
List item Ranges including First/Last item

Loops

1
The break Keyword
2
Python list comprehension
3
Python For loop
4
The Python continue keyword
5
Python loops with range()
6
Python while loops

Strings

1
Escaping characters
2
Indexing and slicing strings
3
Immutable strings

Modules

1
Date and Time in Python
2
Import Python modules
3
Module importing

Dictionaries

1
Accessing and writing data
2
Merging with the .update() method
3
Python dictionaries

Files

1
Python file object
2
Parsing JSON files to dictionary
3
Python readlines method
4
Class csv.DictWriter

Classes

1
Python repr method
2
Instantiate Python class
3
Python class
4
__main__ in Python
5
Polymorphism in Python
6
Method overriding in Python
7
Python inheritance

Function Arguments

1
Default argument is fallback value
2
Mutable default arguments
3
Python function default return value
4
Bluss Academy Feedback

Be the first to add a review.

Please, login to leave a review