Skip to content

SoamDASH/Python-A-to-Z

Repository files navigation

Basic to Advanced all python tutorials with my own designed notes

Learn python with SOAM We will cover each and every topic from based on worlds best recommanded books and course if you guys want to discusion zoom also i am available

Screenshot

Section 1. Fundamentals

Syntax – introduce you to the basic Python programming syntax.

Variables – explain to you what variables are and how to create concise and meaningful variables.

Strings – learn about string data and some basic string operations.

Numbers – introduce to you the commonly-used number types including integers and floating-point numbers.

Booleans – explain the Boolean data type, false and truth values in Python.

Constants – show you how to define constants in Python.

Comments – learn how to make notes in your code.

Type conversion – learn how to convert a value of one type to another e.g., converting a string to a number. Converting from string to integer:

number_str = "42"

number_int = int(number_str) print(number_int) # Output: 42

Converting from integer to string:

number_int = 42 number_str = str(number_int) print(number_str) # Output: "42"

Converting from string to float:

float_str = "3.14" float_num = float(float_str) print(float_num) # Output: 3.14

Converting from float to integer:

float_num = 3.14 int_num = int(float_num) print(int_num) # Output: 3

Converting from list to string:

my_list = [1, 2, 3] list_str = str(my_list) print(list_str) # Output: "[1, 2, 3]"

Converting from string to list:

list_str = "[1, 2, 3]" my_list = eval(list_str) print(my_list) # Output: [1, 2, 3]

Note: We cant change string to integer

Input function - The input() function in Python is used to get input from the user. It displays a prompt message (optional) and waits for the user to enter a value. The value entered by the user is returned as a string.

name = input("Enter your name: ") print("Hello, " + name + "!")

age = input("Enter your age: ") print("You are " + age + " years old.")

Types of error:

SyntaxError: This error occurs when there is a violation of the Python syntax rules.

NameError: This error occurs when a variable or name is used before it is defined or declared.

TypeError: This error occurs when an operation is performed on an object of an inappropriate type.

ValueError: This error occurs when a function receives an argument of the correct type but an inappropriate value.

Section 2. Operators

Arithmetic Operators - used to perform mathematical operations such as addition, subtraction, multiplication, division, modulus, etc., on the given operands.

https://youtu.be/XfBBeyBOzF0

Comparison operators – introduce you to the comparison operators and how to use them to compare two values.

https://www.youtube.com/watch?v=Aamih6LtMNM

Logical operators – show you how to use logical operators to combine multiple conditions.

https://www.youtube.com/watch?v=TeCjHTYWNAw&t=1s

Membership Operator

https://www.youtube.com/watch?v=a0m0T5PUhks

Bitwise Operators

https://www.youtube.com/watch?v=4axKA6n8zLQ

Section 3. Control flow

if…else statement – learn how to execute a code block based on a condition.

https://www.youtube.com/watch?v=ceiuLR2ysas&list=PLu0W_9lII9agwh1XjRt242xIpHhPT2llg&index=14

Ternary operator – introduce you to the Python ternary operator that makes your code more concise.

(289) Ternary Operator - Python Tutorial 21 - YouTube

Match Case:

(289) Match Case Statements in Python | Python Tutorial - Day #16 - YouTube

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published