Under construction Hello and welcome to my Python beginners course. 🐍 In this repository, you will find a variety of code examples, projects, exercises, and informative insights in each script. The goal is to build a free, high-quality, and easy-to-understand tutorial. In the future, I plan to create a detailed script that further deepens the theoretical content.
PythonBeginnerGuide_fl97-mo.ipynb
: Your personal Python mentor!- Theoretical introduction to Python with practical examples
- Interactively designed
HelloWorld.py
: A simple script used to test GitHub settings and print "Hello, World!"ArithmeticOperators.py
: Explanation and demonstration of arithmetic operatorsVariables.py
: What is a variable, how do I use it?- Assigning values to variables of different data types (strings, integers, floats, booleans)
- Reassigning variables and changing their values or types throughout the code
- Assigning multiple variables in one line
- Checking the type of a variable using
type()
.
Input_TypeConversion
: Working with user input and converting data typesinput()
function for user interaction- Converting data types using
int()
,float()
, andstr()
.
StringOperations.py
: String functions explained- Creating and indexing strings
- Combining (concatenating), converting, and formatting strings
text[::4]
,.lower()
,.upper()
,.replace()
,.split()
,"-".join()
,f"{variable}"
,.format()
Boolean_Logic_Conditionals.py
: Introduction to boolean logic and conditional statementsTrue
andFalse
values- Comparison operators (
==
,!=
,>
,<
,>=
,<=
) - Logical operators (
and
,or
,not
)
Loops.py
: Basic introduction into loopswhile
loops for conditional executionfor
loops for iterating over sequences- Examples including skipping iterations, breaking out of loops, and reverse looping
NestedLoops.py
: Understanding the logic behind it and be able to apply it in practice- Printing a square pattern
- Iterating over a shopping cart (list of dictionaries)
- Creating a multiplication table (2d matrix)
ErrorHandling.py
: Basics of error handling in Python- Using
try
,except
,else
, andfinally
- Handling
ValueError
andZeroDivisionError
- Using
Basics.py
: Examples showcasing:Args_Kwargs.py
: Making functions more flexible:funtion(*args)
: use custom amount of argumentsfunction(**kwargs)
: use custom amount of key:value pairs
Collections.py
: Explaination and examples of collection types- Lists
- Sets
- Tuples
Dictionaries.py
: A special type of collection with key-value pairs- Adding, updating and removing pairs
- Accessing pairs
- Iterating over dictionaries
ListComprehensions.py
: Compact way to create and manipulate lists- Basic syntax:
[EXPRESSION for ITEM in ITERABLE]
if
andif-else
list comprehensions
- Basic syntax:
01_BuiltInModules/Math.py
: Exploring Python'smath
module- Common mathematical functions like
sqrt()
,pow()
,ceil()
, andfloor()
- Recreating those functions manually
- Common mathematical functions like
01_BuiltInModules/Random.py
: Exploring Python'srandom
module- Typically used functions like
randint()
,shuffle()
,choices()
, andrandrange()
- Typically used functions like
01_BuiltInModules/DateTime.py
: Python'sdatetime
module- Getting the current date and time, manipulating dates.
01_BuiltInModules/Statistics.py
: Python'sstatistics
module- Useful statistics funtions like
mean()
,median()
,variance()
, etc.
- Useful statistics funtions like
02_CustomModules/Supermarket.py
: Creating our own supermarket module!- Defining own functions in our module
calculate_total_price()
andgreet_customer()
- Using Docstrings
- Using
main.py
to import and use those
- Defining own functions in our module
01_Objects/
: Introduction to object-oriented programming02_Inheritance/
: Simple example of inheritancemain.py
: examples and executionsstore_product.py
: Parent classvegetable.py
: Child class inheriting fromstore_product.py
FizzBuzz.py
: rather less a project, more a general question in coding interviews- Structure and short example
ShoppingList.py
: A shopping list program where you can:ToDoList.py
: A To-do-list where you can:Hangman.py
: A python version of the classic hangman game:CeasarCipher.py
: A simple encryption and decryption program using the Caesar cipher- Encrypts and decrypts messages by shifting the alphabet by a random number of positions
Product_Information_Menu.py
&While_Loop_Product_Information.py
: Solutions to an exercise of the script
BubbleSort.py
: A simple algorithm to sort a list of values by comparing and swapping neighbors.InsertionSort.py
: Builds sorted list each element at a time by inserting into the correct position.BreadthFirstSearch.py
: A simple implementation of the Breadth-First Search algorithmSelectionSort.py
: Repeatedly selects the smallest element from the unsorted part and moves it to the beginning.
- Clone the repository:
git clone https://github.com/fl97-mo/Level-1-Python-Beginner-Guide
- Navigate to the directory and run a script:
cd Level-1-Python-Beginner-Guide
python 01_Basics/HelloWorld.py