├── .github └── FUNDING.yml ├── 01_variables ├── 01_code.py └── README.md ├── 02_types_and_conversions ├── 02_code.py └── README.md ├── 03_input ├── 03_code.py └── README.md ├── 04_formatted_strings ├── 04_code.py └── README.md ├── 05_methods ├── 05_code.py └── README.md ├── 06_string_methods ├── 06_code.py └── README.md ├── 07_math_operations ├── 07_code.py └── README.md ├── 08_imports ├── 08_code.py └── README.md ├── 09_expressions ├── 09_code.py └── README.md ├── 10_if_conditions ├── 10_code.py └── README.md ├── 11_else_if_statements ├── 11_code.py └── README.md ├── 12_advanced_if_statements ├── 12_code.py └── README.md ├── 13_lists ├── 13_code.py └── README.md ├── 14_list_methods ├── 14_code.py └── README.md ├── 15_python_name_picker ├── 15_code.py └── README.md ├── 16_tuples ├── 16_code.py └── README.md ├── 17_dictionaries ├── 17_code.py └── README.md ├── 18_dictionary_methods ├── 18_code.py └── README.md ├── 19_range_builtin_function ├── 19_code.py └── README.md ├── 20_for_loops ├── 20_code.py └── README.md ├── 21_debugging ├── 21_code.py └── README.md ├── 22_break_statement ├── 22_code.py └── README.md ├── 23_value_decrement_increment ├── 23_code.py └── README.md ├── 24_while_loops ├── 24_code.py └── README.md ├── 25_while_true ├── 25_code.py └── README.md ├── 26_iterable_or_not_iterable ├── 26_code.py └── README.md ├── 27_python_elevator ├── 27_code.py └── README.md ├── 28_functions ├── 28_code.py └── README.md ├── 29_function_parameters ├── 29_code.py └── README.md ├── 30_python_pythagoras ├── 30_code.py └── README.md ├── 31_return_statement ├── 31_code.py └── README.md ├── 32_python_creditcard ├── 32_code.py └── README.md ├── 33_classes ├── 33_code.py └── README.md ├── 34_instance_attributes ├── 34_code.py └── README.md ├── 35_constructor ├── 35_code.py └── README.md ├── 36_instance methods ├── 36_code.py └── README.md ├── 37_why_self ├── 37_code.py └── README.md ├── 38_class_and_instance_attributes ├── 38_code.py └── README.md ├── 39_war_game ├── 39_code.py └── README.md └── README.md /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [jimdevops19] 2 | patreon: jimshapedcoding 3 | custom: ["https://www.buymeacoffee.com/jimsc"] 4 | -------------------------------------------------------------------------------- /01_variables/01_code.py: -------------------------------------------------------------------------------- 1 | #Variables 2 | 3 | #Variables helps us to store key&value information that we would like to refer to its value throughout the program 4 | 5 | 6 | name = "Michael" 7 | age = 30 8 | 9 | print(name, "is my name") 10 | print(name, "is", age, "years old") 11 | print(name, "likes to eat pizza") 12 | print("This man's name is", name) 13 | 14 | 15 | -------------------------------------------------------------------------------- /01_variables/README.md: -------------------------------------------------------------------------------- 1 | # Variables 2 | ## Variables helps us to store key&value information that we would like to refer to its value throughout the program 3 | ```python 4 | name = "Michael" 5 | age = 30 6 | 7 | print(name, "is my name") 8 | print(name, "is", age, "years old") 9 | print(name, "likes to eat pizza") 10 | print("This man's name is", name) 11 | 12 | 13 | 14 | ``` 15 | ## Exercise: 16 | 17 | ### Is there a way that you can create more than one variable in one line of code ? Worth to search on web if this could be done! 18 | 19 | ### Answer: 20 | ```python 21 | a, b, c = 1,2,3 # a will receive 1, b will receive 2, c will receive 3 22 | #More examples: 23 | print(a) 24 | print(b) 25 | print(c) 26 | 27 | name, age = "Jim", 25 28 | print(name) 29 | print(age) 30 | ``` 31 | -------------------------------------------------------------------------------- /02_types_and_conversions/02_code.py: -------------------------------------------------------------------------------- 1 | #Types and Conversions 2 | 3 | #We can divide in any programming language some variable types into categories 4 | 5 | 6 | #All types: 7 | name = "John" #Strings - Characters that we want to create/store variables 8 | age = 30 #Integers - Numbers without decimal point 9 | temperature = 90.5 #Floating Numbers / Floats - Numbers with decimal point 10 | is_raining = False #Booleans - Describes a situation - True or False 11 | 12 | #str() - Will convert to string 13 | #int() - Will convert to integers 14 | #float() - Will convert to floating numbers 15 | #bool() - Will convert to booleans 16 | 17 | #Temperature average program: 18 | temperature1 = 95.5 19 | temperature2 = 94.5 20 | average = (temperature1 + temperature2) / 2 21 | print(int(average)) 22 | 23 | #Concatenate digits program: 24 | digit_one = 1 25 | digit_two = 2 26 | print(str(digit_one) + str(digit_two)) 27 | -------------------------------------------------------------------------------- /02_types_and_conversions/README.md: -------------------------------------------------------------------------------- 1 | # Types and Conversions 2 | ## We can divide in any programming language some variable types into categories 3 | ```python 4 | #All types: 5 | name = "John" #Strings - Characters that we want to create/store variables 6 | age = 30 #Integers - Numbers without decimal point 7 | temperature = 90.5 #Floating Numbers / Floats - Numbers with decimal point 8 | is_raining = False #Booleans - Describes a situation - True or False 9 | 10 | #str() - Will convert to string 11 | #int() - Will convert to integers 12 | #float() - Will convert to floating numbers 13 | #bool() - Will convert to booleans 14 | 15 | #Temperature average program: 16 | temperature1 = 95.5 17 | temperature2 = 94.5 18 | average = (temperature1 + temperature2) / 2 19 | print(int(average)) 20 | 21 | #Concatenate digits program: 22 | digit_one = 1 23 | digit_two = 2 24 | print(str(digit_one) + str(digit_two)) 25 | 26 | ``` -------------------------------------------------------------------------------- /03_input/03_code.py: -------------------------------------------------------------------------------- 1 | #Input built in function 2 | 3 | #Input built-in function allows to receive input from the user while the programs runs. Program won't resume till you put your input 4 | 5 | 6 | #We always want to assign the input built-in function to a variable 7 | answer = input("How is the weather today") 8 | print("The weather today is ", answer) 9 | 10 | #You can force your inputs to receive specific types of variables: 11 | current_year = 2021 12 | answer = int(input("What is your age?")) # We could use any built-in conversion function here we'd like 13 | print("Your year of birth is", current_year - answer) 14 | 15 | 16 | -------------------------------------------------------------------------------- /03_input/README.md: -------------------------------------------------------------------------------- 1 | # Input built in function 2 | ## Input built-in function allows to receive input from the user while the programs runs. Program won't resume till you put your input 3 | ```python 4 | #We always want to assign the input built-in function to a variable 5 | answer = input("How is the weather today") 6 | print("The weather today is ", answer) 7 | 8 | #You can force your inputs to receive specific types of variables: 9 | current_year = 2021 10 | answer = int(input("What is your age?")) # We could use any built-in conversion function here we'd like 11 | print("Your year of birth is", current_year - answer) 12 | 13 | 14 | 15 | ``` 16 | ## Exercise: 17 | 18 | ### Write a program that will receive three inputs, grade_one, grade_two, grade_three. Try to write a program that will print the average of the received three grades. 19 | 20 | ### Answer: 21 | ```python 22 | #We need to force each input to be integers (float would also work) 23 | grade_one = int(input("What is the first grade?")) 24 | grade_two = int(input("What is the second grade?")) 25 | grade_three = int(input("What is the third grade?")) 26 | 27 | avg = (grade_one + grade_two + grade_three) / 3 28 | print("Average is:", avg) 29 | ``` 30 | -------------------------------------------------------------------------------- /04_formatted_strings/04_code.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jimdevops19/PythonCrashCourse/1a426521eb5dc64c864af9c0bb61dd9bb7348bfd/04_formatted_strings/04_code.py -------------------------------------------------------------------------------- /04_formatted_strings/README.md: -------------------------------------------------------------------------------- 1 | # Formatted Strings: 2 | ## Formatted Strings helps us to write human readable print sentences, by the possiblity to refer to our variables' values within the provided string 3 | 4 | ```python 5 | #We need to use f letter before opening the string quotes (single or double) 6 | current_year = 2021 7 | print("Current year is", current_year, ". Next year is", current_year + 1) # Bad Example 8 | print(f"Current year is {current_year}. Next year is {current_year + 1}") # Good Example 9 | ``` 10 | 11 | ## Exercise: 12 | 13 | ### Insert those variables inside a formatted string, describe the print sentence the way you'd like 14 | ```python 15 | favorite_language = "Python" 16 | platform = "Youtube" 17 | channel_name = "JSC" 18 | ``` 19 | 20 | ### Answer: 21 | ```python 22 | #We need to write some print lines starting with f letter before the single/double quotes 23 | print(f"My favorite language now is {favorite_language}") 24 | print(f"I learn about this language on {platform}") 25 | print(f"The course I take now is on the channel of: {channel_name}") 26 | ``` -------------------------------------------------------------------------------- /05_methods/05_code.py: -------------------------------------------------------------------------------- 1 | #Methods 2 | 3 | #Different variable types are going to have their unique methods 4 | 5 | 6 | #This is the name of our person: 7 | name = "John doe" 8 | 9 | #Say that we want this person to have the name spelled as it supposed to be: John Doe 10 | #We can launch this method: 11 | 12 | print(name.title()) # Will print John Doe 13 | 14 | #We might think that once you launch this method on the variable, it will override it for the rest of the program 15 | 16 | #BUT: 17 | #Lets write this program now: 18 | 19 | name_two = "John doe" 20 | name_two.title() 21 | print(name_two) # This line will STILL show: John doe 22 | 23 | #Reason: 24 | #Not all the methods out there, will affect the value of the variable that you apply the method on. 25 | 26 | #To really override the value itself, we can launch this: 27 | 28 | name_three = 'John doe' 29 | name_three = name_three.title() 30 | print(name_three) # This line will print John Doe -------------------------------------------------------------------------------- /05_methods/README.md: -------------------------------------------------------------------------------- 1 | # Methods 2 | ## Different variable types are going to have their unique methods 3 | ```python 4 | #This is the name of our person: 5 | name = "John doe" 6 | 7 | #Say that we want this person to have the name spelled as it supposed to be: John Doe 8 | #We can launch this method: 9 | 10 | print(name.title()) # Will print John Doe 11 | 12 | #We might think that once you launch this method on the variable, it will override it for the rest of the program 13 | 14 | #BUT: 15 | #Lets write this program now: 16 | 17 | name_two = "John doe" 18 | name_two.title() 19 | print(name_two) # This line will STILL show: John doe 20 | 21 | #Reason: 22 | #Not all the methods out there, will affect the value of the variable that you apply the method on. 23 | 24 | #To really override the value itself, we can launch this: 25 | 26 | name_three = 'John doe' 27 | name_three = name_three.title() 28 | print(name_three) # This line will print John Doe 29 | ``` -------------------------------------------------------------------------------- /06_string_methods/06_code.py: -------------------------------------------------------------------------------- 1 | #String Methods: 2 | 3 | #String has its unique methods to display them in different ways 4 | 5 | 6 | #Here are some example you can try to execute: 7 | 8 | #.title() - Will capitalize each word on the string 9 | #.capitalize() - Will capitalize the first letter ONLY 10 | #.upper() - Will turn all letters in uppercase 11 | #.lower() - Will turn all lower in uppercase 12 | name = "John doe" 13 | print(f"Title: {name.title()}") 14 | print(f"Capitalize: {name.capitalize()}") 15 | print(f"Upper: {name.upper()}") 16 | print(f"Lower: {name.lower()}") 17 | 18 | 19 | ###PRACTICE### 20 | #Q: Is there a way to see how many characters we have inside a string ? Try to search for a way to do so. 21 | course_name = "JimShapedCoding" # We should find a python built-in function that will automatically count the characters, and give us back 15 22 | #A: 23 | #len - A built-in function that will allow us to count the number of characters in a string. We will use the len built-in function as well in more complex variable types that we will learn in the future 24 | course_name_length = len(course_name) 25 | print(course_name_length) #Will return 15 -------------------------------------------------------------------------------- /06_string_methods/README.md: -------------------------------------------------------------------------------- 1 | # String Methods 2 | ## String has its unique methods to display them in different ways 3 | ```python 4 | #Here are some example you can try to execute: 5 | 6 | #.title() - Will capitalize each word on the string 7 | #.capitalize() - Will capitalize the first letter ONLY 8 | #.upper() - Will turn all letters in uppercase 9 | #.lower() - Will turn all lower in uppercase 10 | name = "John doe" 11 | print(f"Title: {name.title()}") 12 | print(f"Capitalize: {name.capitalize()}") 13 | print(f"Upper: {name.upper()}") 14 | print(f"Lower: {name.lower()}") 15 | ``` 16 | 17 | ## Exercise: 18 | 19 | ### Is there a way to see how many characters we have inside a string ? Try to search for a way to do so. 20 | ```python 21 | course_name = "JimShapedCoding" # We should find a python built-in function that will automatically count the characters, and give us back 15 22 | ``` 23 | 24 | ### Answer: 25 | ```python 26 | #len - A built-in function that will allow us to count the number of characters in a string. We will use the len built-in function as well in more complex variable types that we will learn in the future 27 | course_name_length = len(course_name) 28 | print(course_name_length) #Will return 15 29 | ``` -------------------------------------------------------------------------------- /07_math_operations/07_code.py: -------------------------------------------------------------------------------- 1 | #Math Operators 2 | 3 | #Most of the known arithmetic operations are available to use like in real life math 4 | 5 | 6 | #type() - A built-in function that will give us back the 7 | #type of a specific variable 8 | 9 | # Addition - 3 + 2 10 | # Subtraction - 3 + 2 11 | # Division - 3 / 2 (Will return float) 12 | # Division without Remainder - 3 // 2 13 | # Multiply - 3 * 2 14 | # Power - 3 ** 2 15 | # Modulus - 3 % 2 16 | 17 | 18 | action = 3 + 2 # Change the operation to what you want to test out 19 | print(f'Result is: {action}') -------------------------------------------------------------------------------- /07_math_operations/README.md: -------------------------------------------------------------------------------- 1 | # Math Operators 2 | ## Most of the known arithmetic operations are available to use like in real life math 3 | ```python 4 | #type() - A built-in function that will give us back the 5 | #type of a specific variable 6 | 7 | # Addition - 3 + 2 8 | # Subtraction - 3 + 2 9 | # Division - 3 / 2 (Will return float) 10 | # Division without Remainder - 3 // 2 11 | # Multiply - 3 * 2 12 | # Power - 3 ** 2 13 | # Modulus - 3 % 2 14 | 15 | 16 | action = 3 + 2 # Change the operation to what you want to test out 17 | print(f'Result is: {action}') 18 | ``` -------------------------------------------------------------------------------- /08_imports/08_code.py: -------------------------------------------------------------------------------- 1 | #Imports 2 | 3 | #There are tons of external libraries in Python that you can use them by calling it's name using the built-in keyword import 4 | 5 | 6 | import math 7 | 8 | #For example, say that we want to perform some more complex 9 | #Math operations, than we can go and import the math library 10 | #And use its additional functionalities like that: 11 | a = 8.2 12 | b = math.floor(a) 13 | c = math.ceil(a) 14 | print(b) 15 | print(c) 16 | 17 | #Remember, there are some more ways that you can import 18 | #Additional functionalities. 19 | #You can refer to the specific function that you want to import 20 | #FROM an external library 21 | 22 | from math import ceil 23 | 24 | #And then use it like: 25 | 26 | d = 8.2 27 | e = ceil(d) 28 | print(e) 29 | 30 | #But that approach is less common, since the 31 | #Python will load the entire library anyway. 32 | #We could think that importing specific function could improve 33 | #the time run of our program, but this is not the case -------------------------------------------------------------------------------- /08_imports/README.md: -------------------------------------------------------------------------------- 1 | # Imports 2 | ## There are tons of external libraries in Python that you can use them by calling it's name using the built-in keyword import 3 | ```python 4 | import math 5 | 6 | #For example, say that we want to perform some more complex 7 | #Math operations, than we can go and import the math library 8 | #And use its additional functionalities like that: 9 | a = 8.2 10 | b = math.floor(a) 11 | c = math.ceil(a) 12 | print(b) 13 | print(c) 14 | 15 | #Remember, there are some more ways that you can import 16 | #Additional functionalities. 17 | #You can refer to the specific function that you want to import 18 | #FROM an external library 19 | 20 | from math import ceil 21 | 22 | #And then use it like: 23 | 24 | d = 8.2 25 | e = ceil(d) 26 | print(e) 27 | 28 | #But that approach is less common, since the 29 | #Python will load the entire library anyway. 30 | #We could think that importing specific function could improve 31 | #the time run of our program, but this is not the case 32 | ``` -------------------------------------------------------------------------------- /09_expressions/09_code.py: -------------------------------------------------------------------------------- 1 | #Expressions 2 | 3 | #Expressions will allow us to define different situations on our program, that will give us back the value of True or False 4 | 5 | 6 | #Expressions usually are going to be described with at least one of the following operators 7 | 8 | # == Equal 9 | # != Not equal 10 | # > Greater than 11 | # < Less than 12 | # >= Greater than or equal to 13 | # <= Less than or equal to 14 | 15 | # There are some more keyworded operators that we will look what they do in the future 16 | 17 | print(5 == 5) #True 18 | print(5 != 5) #False 19 | print(5 > 5) #False 20 | print(5 < 5) #False 21 | print(5 >= 5) #True 22 | print(5 <= 5) #True -------------------------------------------------------------------------------- /09_expressions/README.md: -------------------------------------------------------------------------------- 1 | # Expressions 2 | ## Expressions will allow us to define different situations on our program, that will give us back the value of True or False 3 | ```python 4 | #Expressions usually are going to be described with at least one of the following operators 5 | 6 | # == Equal 7 | # != Not equal 8 | # > Greater than 9 | # < Less than 10 | # >= Greater than or equal to 11 | # <= Less than or equal to 12 | 13 | # There are some more keyworded operators that we will look what they do in the future 14 | 15 | print(5 == 5) #True 16 | print(5 != 5) #False 17 | print(5 > 5) #False 18 | print(5 < 5) #False 19 | print(5 >= 5) #True 20 | print(5 <= 5) #True 21 | ``` -------------------------------------------------------------------------------- /10_if_conditions/10_code.py: -------------------------------------------------------------------------------- 1 | #If Statements 2 | 3 | #If statement will allow you to decide whether if to execute a bunch of code, depending on a result of an expression you define. 4 | 5 | 6 | #This Program print's descriptive message about how John did in the last exam. 7 | #If grade is greater than 70, then he passed the exam 8 | grade_john = 80 9 | if grade_john > 70: 10 | print("Congratulation! You passed the exam.") 11 | else: 12 | print("You failed the exam!") 13 | #Each if statement will usually have an else statement, to cover the cases that python did not enter the if statement. 14 | 15 | #Some exercise we done throughout the tutorial: 16 | 17 | # Write a multi-line message 18 | student_name = "john michael" 19 | is_snowing = True 20 | 21 | # Program should print a well written email 22 | # If John should go to school today or not 23 | # Solution: 24 | 25 | if is_snowing: 26 | print(f""" 27 | Hi {student_name.title()}. 28 | You should not come to school today. 29 | Thanks, school management. 30 | """) 31 | 32 | else: 33 | print(f""" 34 | Hi {student_name.title()}. 35 | Today the weather is fine, so please come to school. 36 | Thanks, school management. 37 | """) 38 | 39 | 40 | #NOTE: multi-line strings could brim over the indentation although you are inside an if statement! -------------------------------------------------------------------------------- /10_if_conditions/README.md: -------------------------------------------------------------------------------- 1 | # If Statements 2 | ## If statement will allow you to decide whether if to execute a bunch of code, depending on a result of an expression you define. 3 | ```python 4 | #This Program print's descriptive message about how John did in the last exam. 5 | #If grade is greater than 70, then he passed the exam 6 | grade_john = 80 7 | if grade_john > 70: 8 | print("Congratulation! You passed the exam.") 9 | else: 10 | print("You failed the exam!") 11 | #Each if statement will usually have an else statement, to cover the cases that python did not enter the if statement. 12 | 13 | #Some exercise we done throughout the tutorial: 14 | 15 | # Write a multi-line message 16 | student_name = "john michael" 17 | is_snowing = True 18 | 19 | # Program should print a well written email 20 | # If John should go to school today or not 21 | # Solution: 22 | 23 | if is_snowing: 24 | print(f""" 25 | Hi {student_name.title()}. 26 | You should not come to school today. 27 | Thanks, school management. 28 | """) 29 | 30 | else: 31 | print(f""" 32 | Hi {student_name.title()}. 33 | Today the weather is fine, so please come to school. 34 | Thanks, school management. 35 | """) 36 | 37 | 38 | #NOTE: multi-line strings could brim over the indentation although you are inside an if statement! 39 | ``` -------------------------------------------------------------------------------- /11_else_if_statements/11_code.py: -------------------------------------------------------------------------------- 1 | #Else if Statements 2 | 3 | #Sometimes we might want to extend our decision making when we create if statements. Else if could help us to create more conditions to decide what lines of code to execute 4 | 5 | 6 | #You can change both those values to test the results of this program 7 | is_snowing = True 8 | is_raining = True 9 | if is_snowing: 10 | print("It's extremely cold outside") 11 | elif is_raining: 12 | print("It's not so cold outside") 13 | else: 14 | print("It's not cold outside") 15 | 16 | #If, Elif and Else are associated together. 17 | #It is important to remember that Python will always look to enter one statement in one nested If statement. -------------------------------------------------------------------------------- /11_else_if_statements/README.md: -------------------------------------------------------------------------------- 1 | # Else if Statements 2 | ## Sometimes we might want to extend our decision making when we create if statements. Else if could help us to create more conditions to decide what lines of code to execute 3 | ```python 4 | #You can change both those values to test the results of this program 5 | is_snowing = True 6 | is_raining = True 7 | if is_snowing: 8 | print("It's extremely cold outside") 9 | elif is_raining: 10 | print("It's not so cold outside") 11 | else: 12 | print("It's not cold outside") 13 | 14 | #If, Elif and Else are associated together. 15 | #It is important to remember that Python will always look to enter one statement in one nested If statement. 16 | ``` -------------------------------------------------------------------------------- /12_advanced_if_statements/12_code.py: -------------------------------------------------------------------------------- 1 | #Advanced If Statements 2 | 3 | #Expressions could be merged with some special keywords like **and**, **or** and it could add more complexity to our If statements 4 | 5 | 6 | #Those keywords are also known as Logical Operators: 7 | 8 | #and - True if both statements are true 9 | #or - True if one of the statements is true 10 | #not - Reverses the result of the statement 11 | 12 | is_snowing = True #Change this to test the results 13 | is_raining = False #Change this to test the results 14 | 15 | is_hot = not is_snowing 16 | is_cold = is_snowing or is_raining 17 | both_snowing_and_raining = is_snowing and is_raining 18 | 19 | print(f"Is Cold: {is_cold}") 20 | print(f"Is Hot: {is_hot}") 21 | print(f"Both Snowing And Raining: {both_snowing_and_raining}") 22 | 23 | 24 | -------------------------------------------------------------------------------- /12_advanced_if_statements/README.md: -------------------------------------------------------------------------------- 1 | # Advanced If Statements 2 | ## Expressions could be merged with some special keywords like **and**, **or** and it could add more complexity to our If statements 3 | ```python 4 | #Those keywords are also known as Logical Operators: 5 | 6 | #and - True if both statements are true 7 | #or - True if one of the statements is true 8 | #not - Reverses the result of the statement 9 | 10 | is_snowing = True #Change this to test the results 11 | is_raining = False #Change this to test the results 12 | 13 | is_hot = not is_snowing 14 | is_cold = is_snowing or is_raining 15 | both_snowing_and_raining = is_snowing and is_raining 16 | 17 | print(f"Is Cold: {is_cold}") 18 | print(f"Is Hot: {is_hot}") 19 | print(f"Both Snowing And Raining: {both_snowing_and_raining}") 20 | 21 | 22 | 23 | ``` 24 | ## Exercise: 25 | 26 | ### Write a Program that simulates registration to a website. You need to receive those 3 inputs: 27 | - Username 28 | - Password 29 | - Confirm Password 30 | 31 | ### Your Registration System must meet those requirements: 32 | - Username's length includes atleast 6 or more characters 33 | - Password matches the Confirm Password 34 | 35 | ### Suggestion: Write if statement that will include AND logical operator and show a nice print message if the given info is good (meets the requirements) or not good 36 | 37 | ### Answer: 38 | ```python 39 | #We need to start with three inputs 40 | username = input("What is your username?") 41 | password = input("What is your password?") 42 | confirm_password = input("Please confirm Password?") 43 | 44 | first_requirement = len(username) >= 6 #If you remember, len is the built-in function to give the amount of characters in a given string 45 | second_requirement = password == confirm_password 46 | 47 | if first_requirement and second_requirement: 48 | print("Your account has been created!") 49 | else: 50 | print("Something went wrong with the registration") 51 | 52 | #There are more requirements that you can apply on this program, obviously, it wouldn't be nice to register users if they will provide in passwords with two characters. 53 | #There are always tons of ways to improve any program! 54 | ``` 55 | 56 | -------------------------------------------------------------------------------- /13_lists/13_code.py: -------------------------------------------------------------------------------- 1 | #Lists 2 | 3 | #Lists allow us to include multiple pieces of information under one variable name. 4 | 5 | 6 | #Examples, with indexing: 7 | people = ["Allen", "Michael", "John", "Ben"] 8 | #0 #1 #2 #3 9 | #-4 #-3 #-2 #-1 10 | 11 | print(people[0]) # first index 12 | 13 | print(people[0]) # second index 14 | 15 | print(people[0]) # third index 16 | 17 | print(people[0]) # fourth index 18 | 19 | print(people[-1]) # first from right (last) 20 | 21 | print(people[-2]) # second from right 22 | 23 | print(people[-3]) # third from right 24 | 25 | print(people[-4]) ## fourth from right 26 | 27 | 28 | #Range indexing, pulling multiple elements 29 | #[:] 30 | print(people[0:2]) #pull indexes 0 and 1 (not 2 because the last number is always not included in end_index) 31 | print(people[:2]) # pull every index till index number 2 (equal to example above, zero could be ommited) 32 | print(people[1:]) #pull everything starting from index 1, (everything except zero) -------------------------------------------------------------------------------- /13_lists/README.md: -------------------------------------------------------------------------------- 1 | # Lists 2 | ## Lists allow us to include multiple pieces of information under one variable name. 3 | ```python 4 | #Examples, with indexing: 5 | people = ["Allen", "Michael", "John", "Ben"] 6 | #0 #1 #2 #3 7 | #-4 #-3 #-2 #-1 8 | 9 | print(people[0]) # first index 10 | 11 | print(people[0]) # second index 12 | 13 | print(people[0]) # third index 14 | 15 | print(people[0]) # fourth index 16 | 17 | print(people[-1]) # first from right (last) 18 | 19 | print(people[-2]) # second from right 20 | 21 | print(people[-3]) # third from right 22 | 23 | print(people[-4]) ## fourth from right 24 | 25 | 26 | #Range indexing, pulling multiple elements 27 | #[:] 28 | print(people[0:2]) #pull indexes 0 and 1 (not 2 because the last number is always not included in end_index) 29 | print(people[:2]) # pull every index till index number 2 (equal to example above, zero could be ommited) 30 | print(people[1:]) #pull everything starting from index 1, (everything except zero) 31 | ``` -------------------------------------------------------------------------------- /14_list_methods/14_code.py: -------------------------------------------------------------------------------- 1 | #List Methods 2 | 3 | #In Lists, you could use a lot of methods to perform different actions on them. 4 | 5 | 6 | #Examples: 7 | people = ["Allen", "Michael", "John", "Ben"] 8 | numbers = [7,5,1,9,2,21,19] 9 | #append - Method to add an element to a list 10 | 11 | #remove - Method to delete an element from a list 12 | # Argument as the element to delete 13 | 14 | #pop - Method to delete an element from a list 15 | # Argument as the index of element to delete 16 | 17 | #sort - Will sort the list of elements 18 | # default sort for str - Alphabetically 19 | # default sort for int - low to high 20 | 21 | people.append("Jim") 22 | people.remove("Allen") 23 | people.pop(0) 24 | people.sort() 25 | numbers.sort() -------------------------------------------------------------------------------- /14_list_methods/README.md: -------------------------------------------------------------------------------- 1 | # List Methods 2 | ## In Lists, you could use a lot of methods to perform different actions on them. 3 | ```python 4 | #Examples: 5 | people = ["Allen", "Michael", "John", "Ben"] 6 | numbers = [7,5,1,9,2,21,19] 7 | #append - Method to add an element to a list 8 | 9 | #remove - Method to delete an element from a list 10 | # Argument as the element to delete 11 | 12 | #pop - Method to delete an element from a list 13 | # Argument as the index of element to delete 14 | 15 | #sort - Will sort the list of elements 16 | # default sort for str - Alphabetically 17 | # default sort for int - low to high 18 | 19 | people.append("Jim") 20 | people.remove("Allen") 21 | people.pop(0) 22 | people.sort() 23 | numbers.sort() 24 | ``` -------------------------------------------------------------------------------- /15_python_name_picker/15_code.py: -------------------------------------------------------------------------------- 1 | #Python Name Picker Exercise 2 | 3 | #Write a program that will pick a name from this list randomly 4 | 5 | 6 | #The chosen name should be deleted from the list 7 | #We might need to use external libraries for this program 8 | #Print a formatted string that will show the chosen element 9 | 10 | #Solution: 11 | import random # We use this library to launch random actions 12 | 13 | 14 | people = ["Allen", "Michael", "John", "Ben"] 15 | chosen_person = random.choice(people) # Will pick one element from the given list 16 | people.remove(chosen_person) 17 | print(f'The chosen person is: {chosen_person}') 18 | print(f'The length of people list: {len(people)}') # Just a line that proves the remove command worked -------------------------------------------------------------------------------- /15_python_name_picker/README.md: -------------------------------------------------------------------------------- 1 | # Python Name Picker Exercise 2 | ## Write a program that will pick a name from this list randomly 3 | ```python 4 | #The chosen name should be deleted from the list 5 | #We might need to use external libraries for this program 6 | #Print a formatted string that will show the chosen element 7 | 8 | #Solution: 9 | import random # We use this library to launch random actions 10 | 11 | 12 | people = ["Allen", "Michael", "John", "Ben"] 13 | chosen_person = random.choice(people) # Will pick one element from the given list 14 | people.remove(chosen_person) 15 | print(f'The chosen person is: {chosen_person}') 16 | print(f'The length of people list: {len(people)}') # Just a line that proves the remove command worked 17 | ``` -------------------------------------------------------------------------------- /16_tuples/16_code.py: -------------------------------------------------------------------------------- 1 | #Tuples 2 | 3 | #Tuples are the immutable version of Lists, Immutable means that once you declare the tuple, you are not allowed to change it's content any more 4 | 5 | 6 | #Lists - [] 7 | #Tuples - () 8 | 9 | days = ("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday") 10 | 11 | #To store days of the week as a tuple is a great idea. 12 | #Because it is obvious that the content does not need to be changed 13 | 14 | #Indexing is supported 15 | 16 | print(days[0]) # Monday 17 | print(days[1]) # Tuesday -------------------------------------------------------------------------------- /16_tuples/README.md: -------------------------------------------------------------------------------- 1 | # Tuples 2 | ## Tuples are the immutable version of Lists, Immutable means that once you declare the tuple, you are not allowed to change it's content any more 3 | ```python 4 | #Lists - [] 5 | #Tuples - () 6 | 7 | days = ("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday") 8 | 9 | #To store days of the week as a tuple is a great idea. 10 | #Because it is obvious that the content does not need to be changed 11 | 12 | #Indexing is supported 13 | 14 | print(days[0]) # Monday 15 | print(days[1]) # Tuesday 16 | ``` -------------------------------------------------------------------------------- /17_dictionaries/17_code.py: -------------------------------------------------------------------------------- 1 | #Dictionaries 2 | 3 | #Dictionaries can allow us to store multiple key value pairs under one variable name 4 | 5 | 6 | #Wrong practice: 7 | friend_name = "Mike" 8 | friend_age = 25 9 | friend_gender = True 10 | friend_weight = 64.5 11 | 12 | #The better approach will be to create dictionary, 13 | #Since the variables have something in common (Friend's attributes) 14 | #And this could be noticed because we use a lot of times the prefix of friend when we create those variables 15 | 16 | #We create dictionaries by using {} to variable assignment: 17 | 18 | friend = { 19 | # "key" : "value" 20 | "name" : "Mike", 21 | "age" : 25, 22 | "is_male" : True, 23 | "weight" : 64.5 24 | } 25 | #See the value of some key: 26 | print(friend["name"]) 27 | print(friend.get("name")) 28 | 29 | #What will happen if we specify a non existing key ? 30 | print(friend["is_female"]) # Will crash the program if you mismatched the key name 31 | print(friend.get("is_female")) # Will try to find the key, and return the attached value, if does not find, will NOT crash your program, but will show - None 32 | 33 | #This could be one more example for a dictionary: 34 | 35 | number_to_letter = { 36 | 1 : "a", 37 | 2 : "b", 38 | 3 : "c" 39 | } 40 | print(number_to_letter[1]) 41 | #It is important to understand that there is no MUST for the key to be a string, although the best practice would be to have your keys as strings usually, reasons: 42 | # Integers might be confusing with indexing (what we learned with lists) 43 | # It feels more descriptive and more human-readable when you have the key as string 44 | 45 | #Like in our cell-phones, in Contacts, we don't attach phone numbers to names, we attach names to phone numbers, just a cleaner look. -------------------------------------------------------------------------------- /17_dictionaries/README.md: -------------------------------------------------------------------------------- 1 | # Dictionaries 2 | ## Dictionaries can allow us to store multiple key value pairs under one variable name 3 | ```python 4 | #Wrong practice: 5 | friend_name = "Mike" 6 | friend_age = 25 7 | friend_gender = True 8 | friend_weight = 64.5 9 | 10 | #The better approach will be to create dictionary, 11 | #Since the variables have something in common (Friend's attributes) 12 | #And this could be noticed because we use a lot of times the prefix of friend when we create those variables 13 | 14 | #We create dictionaries by using {} to variable assignment: 15 | 16 | friend = { 17 | # "key" : "value" 18 | "name" : "Mike", 19 | "age" : 25, 20 | "is_male" : True, 21 | "weight" : 64.5 22 | } 23 | #See the value of some key: 24 | print(friend["name"]) 25 | print(friend.get("name")) 26 | 27 | #What will happen if we specify a non existing key ? 28 | print(friend["is_female"]) # Will crash the program if you mismatched the key name 29 | print(friend.get("is_female")) # Will try to find the key, and return the attached value, if does not find, will NOT crash your program, but will show - None 30 | 31 | #This could be one more example for a dictionary: 32 | 33 | number_to_letter = { 34 | 1 : "a", 35 | 2 : "b", 36 | 3 : "c" 37 | } 38 | print(number_to_letter[1]) 39 | #It is important to understand that there is no MUST for the key to be a string, although the best practice would be to have your keys as strings usually, reasons: 40 | # Integers might be confusing with indexing (what we learned with lists) 41 | # It feels more descriptive and more human-readable when you have the key as string 42 | 43 | #Like in our cell-phones, in Contacts, we don't attach phone numbers to names, we attach names to phone numbers, just a cleaner look. 44 | ``` -------------------------------------------------------------------------------- /18_dictionary_methods/18_code.py: -------------------------------------------------------------------------------- 1 | #Dictionary Methods 2 | 3 | #There are a lot of dictionary will do different manipulations for you with the dictionaries that you work with 4 | 5 | 6 | # keys() - Will collect all the keys 7 | # values() - Will collect all the values 8 | friend = { 9 | "name" : "Mike", 10 | "age" : 25, 11 | "is_male" : True, 12 | "weight" : 64.5 13 | } 14 | print(friend.keys()) 15 | print(friend.values()) 16 | 17 | #Those lines will return you a type of variable 18 | #That it's name is dict_keys 19 | 20 | #To make it more friendly, we can convert it to a list: 21 | 22 | print(list(friend.keys())) 23 | print(list(friend.values())) 24 | 25 | 26 | #There are more useful methods that you can take a look in python official documentation 27 | 28 | -------------------------------------------------------------------------------- /18_dictionary_methods/README.md: -------------------------------------------------------------------------------- 1 | # Dictionary Methods 2 | ## There are a lot of dictionary will do different manipulations for you with the dictionaries that you work with 3 | ```python 4 | # keys() - Will collect all the keys 5 | # values() - Will collect all the values 6 | friend = { 7 | "name" : "Mike", 8 | "age" : 25, 9 | "is_male" : True, 10 | "weight" : 64.5 11 | } 12 | print(friend.keys()) 13 | print(friend.values()) 14 | 15 | #Those lines will return you a type of variable 16 | #That it's name is dict_keys 17 | 18 | #To make it more friendly, we can convert it to a list: 19 | 20 | print(list(friend.keys())) 21 | print(list(friend.values())) 22 | 23 | 24 | #There are more useful methods that you can take a look in python official documentation 25 | 26 | 27 | ``` 28 | ## Exercise: 29 | 30 | ### In the given dictionary that describes names - age, Write the following programs: 31 | - Part 1: Write a program that will check if your best friend (Mike) is inside this dictionary, if so give the value (age) that attached to this key 32 | - Part 2: Search for a dictionary method that will DELETE a key&value pair from a dictionary.And then, delete the first key&value pair from this dictionary 33 | 34 | ### HINT: You can use in operator, to check if element is inside a list, for example: 35 | ```python 36 | check = "Jim" in ["Jim", "John"] 37 | print(check) # Will give True! 38 | #Given Dictionary: 39 | friends = { 40 | "Jack" : 22, 41 | "Mike" : 31, 42 | "Paul" : 18, 43 | "Mark" : 33 44 | } 45 | ``` 46 | 47 | ### Answer: 48 | ```python 49 | #First Part: 50 | keys = list(friends.keys()) 51 | best_friend = "Mike" 52 | if best_friend in keys: 53 | best_friend_age = friends["Mike"] 54 | print(f"{best_friend} is {best_friend_age} years old!") 55 | 56 | #Second Part: 57 | keys = list(friends.keys()) 58 | first_key = keys[0] 59 | friends.pop(first_key) 60 | #Verify if this one worked: 61 | print(friends) 62 | ``` 63 | 64 | -------------------------------------------------------------------------------- /19_range_builtin_function/19_code.py: -------------------------------------------------------------------------------- 1 | #Range Built-in Function 2 | 3 | #Range built in function will allow us to generate list of numbers in a given range of numbers 4 | 5 | 6 | #Use case: 7 | #range(100) - will generate all INTEGERS from 0,99 8 | 9 | #Now we might think here how did it knew to step by 1 each time ? 10 | 11 | #This is it's default value. 12 | 13 | #We can write more complex ranges by providing those three pieces of information in the following order: 14 | 15 | #range(, , ) 16 | 17 | 18 | #Examples: 19 | a = range(1,10,1) # 0 1 2 3 4 5 6 7 8 9 20 | 21 | b = range(1,21,2) # 1 3 5 7 9 11 13 15 17 19 22 | 23 | c = range(5,9,1) # 5 6 7 8 24 | 25 | #We are curious why the number of always not included. 26 | 27 | #Well, this is because the last number is ALWAYS not included, and we just have to remember it when we use this function 28 | 29 | #If we really want to see their values in a given list, then we should convert the result to list, using list() built-in conversion method 30 | 31 | 32 | print(list(a)) 33 | print(list(b)) 34 | print(list(c)) -------------------------------------------------------------------------------- /19_range_builtin_function/README.md: -------------------------------------------------------------------------------- 1 | # Range Built-in Function 2 | ## Range built in function will allow us to generate list of numbers in a given range of numbers 3 | ```python 4 | #Use case: 5 | #range(100) - will generate all INTEGERS from 0,99 6 | 7 | #Now we might think here how did it knew to step by 1 each time ? 8 | 9 | #This is it's default value. 10 | 11 | #We can write more complex ranges by providing those three pieces of information in the following order: 12 | 13 | #range(, , ) 14 | 15 | 16 | #Examples: 17 | a = range(1,10,1) # 0 1 2 3 4 5 6 7 8 9 18 | 19 | b = range(1,21,2) # 1 3 5 7 9 11 13 15 17 19 20 | 21 | c = range(5,9,1) # 5 6 7 8 22 | 23 | #We are curious why the number of always not included. 24 | 25 | #Well, this is because the last number is ALWAYS not included, and we just have to remember it when we use this function 26 | 27 | #If we really want to see their values in a given list, then we should convert the result to list, using list() built-in conversion method 28 | 29 | 30 | print(list(a)) 31 | print(list(b)) 32 | print(list(c)) 33 | ``` -------------------------------------------------------------------------------- /20_for_loops/20_code.py: -------------------------------------------------------------------------------- 1 | #For Loops 2 | 3 | #For loops allows to execute action circularly, depending on the variable type that you apply the for loop on 4 | 5 | 6 | friends = ["Allen", "Ben", "John", "Michael"] 7 | #With this approach, we print the information we want 8 | #But this will require from us to edit our code if we will 9 | #decide one day to add some more friends: 10 | 11 | #print(f"{friends[0]} is my friend") 12 | #print(f"{friends[1]} is my friend") 13 | #print(f"{friends[2]} is my friend") 14 | #print(f"{friends[3]} is my friend") 15 | 16 | #For loops: 17 | #A for loop is used for iterating over a sequence (in this case we have a list.) 18 | #For loop template: 19 | 20 | # for ____ in ______ 21 | # new_var iterable variable type 22 | for my_friend in friends: 23 | print(f"{my_friend} is my friend") 24 | 25 | 26 | #An Exercise that we have done in the tutorial: 27 | 28 | friends = ["Allen", "Ben", "John", "Michael", "Jim"] 29 | best_friend = "Allen" 30 | #Write a program that will check if our best_friend is in 31 | #the friends list. If so, throw a special message. 32 | 33 | #Solution 1: 34 | if best_friend in friends: 35 | print(f"{best_friend} is in the list of friends!") 36 | 37 | #Solution 2: 38 | for friend in friends: 39 | if friend == best_friend: 40 | print(f"{best_friend} is inside the list!") -------------------------------------------------------------------------------- /20_for_loops/README.md: -------------------------------------------------------------------------------- 1 | # For Loops 2 | ## For loops allows to execute action circularly, depending on the variable type that you apply the for loop on 3 | ```python 4 | friends = ["Allen", "Ben", "John", "Michael"] 5 | #With this approach, we print the information we want 6 | #But this will require from us to edit our code if we will 7 | #decide one day to add some more friends: 8 | 9 | #print(f"{friends[0]} is my friend") 10 | #print(f"{friends[1]} is my friend") 11 | #print(f"{friends[2]} is my friend") 12 | #print(f"{friends[3]} is my friend") 13 | 14 | #For loops: 15 | #A for loop is used for iterating over a sequence (in this case we have a list.) 16 | #For loop template: 17 | 18 | # for ____ in ______ 19 | # new_var iterable variable type 20 | for my_friend in friends: 21 | print(f"{my_friend} is my friend") 22 | 23 | 24 | #An Exercise that we have done in the tutorial: 25 | 26 | friends = ["Allen", "Ben", "John", "Michael", "Jim"] 27 | best_friend = "Allen" 28 | #Write a program that will check if our best_friend is in 29 | #the friends list. If so, throw a special message. 30 | 31 | #Solution 1: 32 | if best_friend in friends: 33 | print(f"{best_friend} is in the list of friends!") 34 | 35 | #Solution 2: 36 | for friend in friends: 37 | if friend == best_friend: 38 | print(f"{best_friend} is inside the list!") 39 | ``` -------------------------------------------------------------------------------- /21_debugging/21_code.py: -------------------------------------------------------------------------------- 1 | #Debugging 2 | 3 | #Debugging is the process of locating and eliminating problems within our code execution. 4 | 5 | 6 | #Each IDE will have its own utilities to run programs in debugging mode. 7 | #Debugging could be extremely useful because it gives us the ability to execute code line by line. 8 | #And it gives us full control for the execution which could be helpful for complex programs. 9 | friends = ["Allen", "Ben", "John", "Michael", "Jim"] 10 | best_friend = "Allen" 11 | #Write a program that will check if our best_friend is in 12 | #the friends list. If so, throw a special message. 13 | 14 | #Solution 2: 15 | for friend in friends: 16 | if friend == best_friend: 17 | print(f"{best_friend} is inside the list!") 18 | 19 | 20 | #How to debug with Pycharm? 21 | #You can use the shortcut of SHIFT + F9 to debug. 22 | #IMPORTANT: You should mark some line of code as a break point to initialize debug successfully. -------------------------------------------------------------------------------- /21_debugging/README.md: -------------------------------------------------------------------------------- 1 | # Debugging 2 | ## Debugging is the process of locating and eliminating problems within our code execution. 3 | ```python 4 | #Each IDE will have its own utilities to run programs in debugging mode. 5 | #Debugging could be extremely useful because it gives us the ability to execute code line by line. 6 | #And it gives us full control for the execution which could be helpful for complex programs. 7 | friends = ["Allen", "Ben", "John", "Michael", "Jim"] 8 | best_friend = "Allen" 9 | #Write a program that will check if our best_friend is in 10 | #the friends list. If so, throw a special message. 11 | 12 | #Solution 2: 13 | for friend in friends: 14 | if friend == best_friend: 15 | print(f"{best_friend} is inside the list!") 16 | 17 | 18 | #How to debug with Pycharm? 19 | #You can use the shortcut of SHIFT + F9 to debug. 20 | #IMPORTANT: You should mark some line of code as a break point to initialize debug successfully. 21 | ``` -------------------------------------------------------------------------------- /22_break_statement/22_code.py: -------------------------------------------------------------------------------- 1 | #Break Statement 2 | 3 | #Break keywords are available to use within loops, to immediately getting out of a for loop execution 4 | 5 | 6 | #We should use break keyword when we want to get out of the associated for loop, 7 | #Usually we will do it to check some condition in each iteration, and once we hit true, then we will use break. 8 | #This is useful to efficient our program, and to prevent from unnecessary executions 9 | 10 | #Example: 11 | friends = ["Allen", "Ben", "John", "Michael", "Jim"] 12 | best_friend = "Allen" 13 | 14 | #Write a program that will check if our best_friend is in 15 | #the friends list. If so, throw a special message. 16 | 17 | #Solution: 18 | for friend in friends: 19 | if friend == best_friend: 20 | print(f"{best_friend} is inside the list!") 21 | break 22 | else: 23 | print(f"This is {friend}") 24 | 25 | print("I am just a random line after the for loop") -------------------------------------------------------------------------------- /22_break_statement/README.md: -------------------------------------------------------------------------------- 1 | # Break Statement 2 | ## Break keywords are available to use within loops, to immediately getting out of a for loop execution 3 | ```python 4 | #We should use break keyword when we want to get out of the associated for loop, 5 | #Usually we will do it to check some condition in each iteration, and once we hit true, then we will use break. 6 | #This is useful to efficient our program, and to prevent from unnecessary executions 7 | 8 | #Example: 9 | friends = ["Allen", "Ben", "John", "Michael", "Jim"] 10 | best_friend = "Allen" 11 | 12 | #Write a program that will check if our best_friend is in 13 | #the friends list. If so, throw a special message. 14 | 15 | #Solution: 16 | for friend in friends: 17 | if friend == best_friend: 18 | print(f"{best_friend} is inside the list!") 19 | break 20 | else: 21 | print(f"This is {friend}") 22 | 23 | print("I am just a random line after the for loop") 24 | ``` -------------------------------------------------------------------------------- /23_value_decrement_increment/23_code.py: -------------------------------------------------------------------------------- 1 | #Value Decrement and Increment 2 | 3 | #Value decrement and increment is the process of reassigning a value to an existing variable name. 4 | 5 | 6 | #Example: 7 | age = 24 8 | #Besides using: 9 | age = age + 1 10 | #We could use: 11 | age += 1 12 | #Or besides using 13 | age = age - 1 14 | #We could use 15 | age -= 1 16 | 17 | #An example we showed in the tutorial: 18 | budget = 100 19 | sandwich_price = 5 20 | 21 | #Let's buy 20 sandwiches program! 22 | #budget should decrease by 5 each time you print 23 | #you bought a sandwich 24 | for s in range(20): 25 | print("You bought a sandwich!") 26 | budget -= sandwich_price #Python Decrement 27 | print(budget) 28 | 29 | #You can also use increment like that: 30 | #budget += 10 # Python Increment -------------------------------------------------------------------------------- /23_value_decrement_increment/README.md: -------------------------------------------------------------------------------- 1 | # Value Decrement and Increment 2 | ## Value decrement and increment is the process of reassigning a value to an existing variable name. 3 | ```python 4 | #Example: 5 | age = 24 6 | #Besides using: 7 | age = age + 1 8 | #We could use: 9 | age += 1 10 | #Or besides using 11 | age = age - 1 12 | #We could use 13 | age -= 1 14 | 15 | #An example we showed in the tutorial: 16 | budget = 100 17 | sandwich_price = 5 18 | 19 | #Let's buy 20 sandwiches program! 20 | #budget should decrease by 5 each time you print 21 | #you bought a sandwich 22 | for s in range(20): 23 | print("You bought a sandwich!") 24 | budget -= sandwich_price #Python Decrement 25 | print(budget) 26 | 27 | #You can also use increment like that: 28 | #budget += 10 # Python Increment 29 | ``` -------------------------------------------------------------------------------- /24_while_loops/24_code.py: -------------------------------------------------------------------------------- 1 | #While Loops 2 | 3 | #We can use While loops to run some bunch of code till a condition changes after a while 4 | 5 | 6 | #Example: 7 | budget = 1000 8 | sandwich_price = 5 9 | 10 | while budget > 0: 11 | #Budget is currently greater than 0, it will remain like that, until we actually do something to prevent this from running forever within the while loop. 12 | #Usually we use while loops, it is important to have atleast one line of code that will affect the provided condition after the while keyword, otherwise, we will end up with having a endless loop 13 | print("You bought a sandwich!") 14 | 15 | budget -= sandwich_price #As you can notice here, we have a line that AFFECTS the budget's value. 16 | 17 | print(budget) -------------------------------------------------------------------------------- /24_while_loops/README.md: -------------------------------------------------------------------------------- 1 | # While Loops 2 | ## We can use While loops to run some bunch of code till a condition changes after a while 3 | ```python 4 | #Example: 5 | budget = 1000 6 | sandwich_price = 5 7 | 8 | while budget > 0: 9 | #Budget is currently greater than 0, it will remain like that, until we actually do something to prevent this from running forever within the while loop. 10 | #Usually we use while loops, it is important to have atleast one line of code that will affect the provided condition after the while keyword, otherwise, we will end up with having a endless loop 11 | print("You bought a sandwich!") 12 | 13 | budget -= sandwich_price #As you can notice here, we have a line that AFFECTS the budget's value. 14 | 15 | print(budget) 16 | ``` -------------------------------------------------------------------------------- /25_while_true/25_code.py: -------------------------------------------------------------------------------- 1 | #While True 2 | 3 | #We can use the while True to create programs that will run forever. 4 | 5 | 6 | #We can also include break statements inside our while loops, to quit while loops 7 | #when we'd like to 8 | budget = 30 9 | sandwich_price = 5 10 | 11 | while True: 12 | print("You bought a sandwich!") 13 | budget -= sandwich_price 14 | if budget == 0: 15 | break 16 | 17 | print(budget) -------------------------------------------------------------------------------- /25_while_true/README.md: -------------------------------------------------------------------------------- 1 | # While True 2 | ## We can use the while True to create programs that will run forever. 3 | ```python 4 | #We can also include break statements inside our while loops, to quit while loops 5 | #when we'd like to 6 | budget = 30 7 | sandwich_price = 5 8 | 9 | while True: 10 | print("You bought a sandwich!") 11 | budget -= sandwich_price 12 | if budget == 0: 13 | break 14 | 15 | print(budget) 16 | ``` -------------------------------------------------------------------------------- /26_iterable_or_not_iterable/26_code.py: -------------------------------------------------------------------------------- 1 | #Iterable or Not Iterable 2 | 3 | #In Python, there is a clear division between variable types that are iterable or non iterable 4 | 5 | 6 | #Iterable - Means that you can run a for loop on it 7 | #Non Iterable - Means that you can not run a for loop on it 8 | 9 | num = 1 # Integer - Non Iterable 10 | name = "Jim" # String - Iterable (On each character) 11 | fl = 4.5 # Float - Non Iterable 12 | is_male = True # Boolean - Non Iterable 13 | friends = ['Allen', "Ben"] # List - Iterable (On each element in list) 14 | tpl = ('Allen', 'Ben') # Tuple - Iterable (On each element in tuple) 15 | info = {"name" : "Jim"} # Dictionary - Iterable (On each key&value pair in dictionaries) 16 | 17 | for r in info: #change the iterated value to test the others 18 | print(r) -------------------------------------------------------------------------------- /26_iterable_or_not_iterable/README.md: -------------------------------------------------------------------------------- 1 | # Iterable or Not Iterable 2 | ## In Python, there is a clear division between variable types that are iterable or non iterable 3 | ```python 4 | #Iterable - Means that you can run a for loop on it 5 | #Non Iterable - Means that you can not run a for loop on it 6 | 7 | num = 1 # Integer - Non Iterable 8 | name = "Jim" # String - Iterable (On each character) 9 | fl = 4.5 # Float - Non Iterable 10 | is_male = True # Boolean - Non Iterable 11 | friends = ['Allen', "Ben"] # List - Iterable (On each element in list) 12 | tpl = ('Allen', 'Ben') # Tuple - Iterable (On each element in tuple) 13 | info = {"name" : "Jim"} # Dictionary - Iterable (On each key&value pair in dictionaries) 14 | 15 | for r in info: #change the iterated value to test the others 16 | print(r) 17 | ``` -------------------------------------------------------------------------------- /27_python_elevator/27_code.py: -------------------------------------------------------------------------------- 1 | #Python Elevator Exercise 2 | 3 | #Write a program that will simulate the way that an elevator works. More instuctions could be found in the file: 4 | 5 | 6 | #We should receive an input always 7 | #User may write a number or out 8 | #If he writes number, we should write him you are on {number} floor 9 | #If he writes out, we should stop execution 10 | 11 | #Improvement: 12 | #The building has 20 floors 13 | while True: 14 | answer = input("Which floor you want me to take you?") 15 | if answer == "out": 16 | print("Exiting...") 17 | break 18 | else: 19 | answer_floor = int(answer) 20 | if answer_floor >= 0 and answer_floor <= 20: 21 | print(f"You are on floor number {answer}") 22 | else: 23 | print(f"I can not take you to {answer_floor}") 24 | 25 | #Great addition you can apply, the program should write "You are already on this floor", if you give the same floor number like the latest input -------------------------------------------------------------------------------- /27_python_elevator/README.md: -------------------------------------------------------------------------------- 1 | # Python Elevator Exercise 2 | ## Write a program that will simulate the way that an elevator works. More instuctions could be found in the file: 3 | ```python 4 | #We should receive an input always 5 | #User may write a number or out 6 | #If he writes number, we should write him you are on {number} floor 7 | #If he writes out, we should stop execution 8 | 9 | #Improvement: 10 | #The building has 20 floors 11 | while True: 12 | answer = input("Which floor you want me to take you?") 13 | if answer == "out": 14 | print("Exiting...") 15 | break 16 | else: 17 | answer_floor = int(answer) 18 | if answer_floor >= 0 and answer_floor <= 20: 19 | print(f"You are on floor number {answer}") 20 | else: 21 | print(f"I can not take you to {answer_floor}") 22 | 23 | #Great addition you can apply, the program should write "You are already on this floor", if you give the same floor number like the latest input 24 | ``` -------------------------------------------------------------------------------- /28_functions/28_code.py: -------------------------------------------------------------------------------- 1 | #Functions 2 | 3 | #A function is a block of code which only runs when it is called. 4 | 5 | 6 | #Lets write a special counting program 7 | #You can CREATE a function by using the format: 8 | #def (): 9 | # being the name that you'd like to give to your functions 10 | def special_count(): 11 | for i in range(1, 11, 1): 12 | print(f"Special count {i}") 13 | 14 | #This is how you CALL to a function 15 | special_count() #Call 16 | special_count() #Call 17 | special_count() #Call -------------------------------------------------------------------------------- /28_functions/README.md: -------------------------------------------------------------------------------- 1 | # Functions 2 | ## A function is a block of code which only runs when it is called. 3 | ```python 4 | #Lets write a special counting program 5 | #You can CREATE a function by using the format: 6 | #def (): 7 | # being the name that you'd like to give to your functions 8 | def special_count(): 9 | for i in range(1, 11, 1): 10 | print(f"Special count {i}") 11 | 12 | #This is how you CALL to a function 13 | special_count() #Call 14 | special_count() #Call 15 | special_count() #Call 16 | ``` -------------------------------------------------------------------------------- /29_function_parameters/29_code.py: -------------------------------------------------------------------------------- 1 | #Function Parameters 2 | 3 | #Parameters will help us to accept additional piece of information to execute them 4 | 5 | 6 | #We can pass in the info when we call the functions 7 | #The values that are passed in as info when you call a function, called arguments 8 | def special_count(stop_count): 9 | for i in range(1, stop_count + 1, 1): 10 | print(f"Special count {i}") 11 | 12 | special_count(5) # Count from 1 to 5 13 | special_count(10) # Count from 1 to 10 14 | special_count(20) # Count from 1 to 20 15 | 16 | #Arguments could be passed in by providing the parameter name as well: 17 | special_count(stop_count=5) # Count from 1 to 5 18 | special_count(stop_count=10) # Count from 1 to 10 19 | special_count(stop_count=20) # Count from 1 to 20 20 | 21 | #Multiple Parameters 22 | def special_count(stop_count, step): 23 | for i in range(1, stop_count + 1, step): 24 | print(f"Special count {i}") 25 | 26 | special_count(stop_count=5, step=1) # Count from 1 to 5 27 | special_count(stop_count=10, step=2) # Count from 1 to 10 step 2 28 | special_count(stop_count=20, step=1) # Count from 1 to 20 29 | 30 | 31 | #Mandatory / Non Mandatory Parameters 32 | def special_count(stop_count, step=1): 33 | #stop_count - Mandatory Param, does not have default value 34 | #step - NON Mandatory Param, it has a default value 35 | for i in range(1, stop_count + 1, step): 36 | print(f"Special count {i}") 37 | 38 | special_count(stop_count=5) # Count from 1 to 5 39 | special_count(stop_count=10, step=2) # Count from 1 to 10 step 2 40 | special_count(stop_count=20) # Count from 1 to 20 -------------------------------------------------------------------------------- /29_function_parameters/README.md: -------------------------------------------------------------------------------- 1 | # Function Parameters 2 | ## Parameters will help us to accept additional piece of information to execute them 3 | ```python 4 | #We can pass in the info when we call the functions 5 | #The values that are passed in as info when you call a function, called arguments 6 | def special_count(stop_count): 7 | for i in range(1, stop_count + 1, 1): 8 | print(f"Special count {i}") 9 | 10 | special_count(5) # Count from 1 to 5 11 | special_count(10) # Count from 1 to 10 12 | special_count(20) # Count from 1 to 20 13 | 14 | #Arguments could be passed in by providing the parameter name as well: 15 | special_count(stop_count=5) # Count from 1 to 5 16 | special_count(stop_count=10) # Count from 1 to 10 17 | special_count(stop_count=20) # Count from 1 to 20 18 | 19 | #Multiple Parameters 20 | def special_count(stop_count, step): 21 | for i in range(1, stop_count + 1, step): 22 | print(f"Special count {i}") 23 | 24 | special_count(stop_count=5, step=1) # Count from 1 to 5 25 | special_count(stop_count=10, step=2) # Count from 1 to 10 step 2 26 | special_count(stop_count=20, step=1) # Count from 1 to 20 27 | 28 | 29 | #Mandatory / Non Mandatory Parameters 30 | def special_count(stop_count, step=1): 31 | #stop_count - Mandatory Param, does not have default value 32 | #step - NON Mandatory Param, it has a default value 33 | for i in range(1, stop_count + 1, step): 34 | print(f"Special count {i}") 35 | 36 | special_count(stop_count=5) # Count from 1 to 5 37 | special_count(stop_count=10, step=2) # Count from 1 to 10 step 2 38 | special_count(stop_count=20) # Count from 1 to 20 39 | ``` -------------------------------------------------------------------------------- /30_python_pythagoras/30_code.py: -------------------------------------------------------------------------------- 1 | #Python Pythagoras Exercise 2 | 3 | #Write a function that will accept three parameters, that will check if given combo of numbers apply the pythagoras theory (3,4,5 applies, because 3 ** 2 + 4 ** 2 = 5 ** 2) 4 | 5 | 6 | #Print to the user if the given three numbers 7 | #Apply the Pythagoras formula 8 | # a ** 2 + b ** 2 = c ** 2 9 | def is_pyth_triple(a, b, c): 10 | num_ab = a ** 2 + b ** 2 11 | num_c = c ** 2 12 | if num_ab == num_c: 13 | print(f"The combination of:{a},{b},{c} supports pyth law!") 14 | else: 15 | print(f"The combination of:{a},{b},{c} does not support pyth law!") 16 | 17 | is_pyth_triple(3, 4, 5) 18 | is_pyth_triple(5,6,7) -------------------------------------------------------------------------------- /30_python_pythagoras/README.md: -------------------------------------------------------------------------------- 1 | # Python Pythagoras Exercise 2 | ## Write a function that will accept three parameters, that will check if given combo of numbers apply the pythagoras theory (3,4,5 applies, because 3 ** 2 + 4 ** 2 = 5 ** 2) 3 | ```python 4 | #Print to the user if the given three numbers 5 | #Apply the Pythagoras formula 6 | # a ** 2 + b ** 2 = c ** 2 7 | def is_pyth_triple(a, b, c): 8 | num_ab = a ** 2 + b ** 2 9 | num_c = c ** 2 10 | if num_ab == num_c: 11 | print(f"The combination of:{a},{b},{c} supports pyth law!") 12 | else: 13 | print(f"The combination of:{a},{b},{c} does not support pyth law!") 14 | 15 | is_pyth_triple(3, 4, 5) 16 | is_pyth_triple(5,6,7) 17 | ``` -------------------------------------------------------------------------------- /31_return_statement/31_code.py: -------------------------------------------------------------------------------- 1 | #Return Statement 2 | 3 | #Return keyword used to give value back at the end of your functions, therefore, you could assign your function CALLS to variables and use their values later 4 | 5 | 6 | #Each Function in Python has to give some value back when it completes the execution 7 | #This is designed for assigning the call's of the function to a variable 8 | #And make some uses with this variable in the future 9 | 10 | #This case is going to return nothing, because we did not use return keyword 11 | def square_my_number(num): 12 | print(num ** 2) 13 | 14 | result = square_my_number(num=4) 15 | print(result) 16 | 17 | #So it is equvielant to this: 18 | def square_my_number(num): 19 | print(num ** 2) 20 | return None 21 | 22 | result = square_my_number(num=4) 23 | print(result) 24 | 25 | #But we could decide that we want to store within the result variable the value of 16 26 | #To achieve this, we could write a code like that: 27 | def square_my_number(num): 28 | return num ** 2 29 | 30 | result = square_my_number(num=4) 31 | print(result) 32 | 33 | #Important to remember, that return is a signal for being the last line that will 34 | #execute within a function, so something like this is pointless: 35 | 36 | def square_my_number(num): 37 | return num ** 2 38 | print("One more line to print please") # UNREACHABLE CODE! 39 | 40 | result = square_my_number(num=4) 41 | print(result) 42 | 43 | -------------------------------------------------------------------------------- /31_return_statement/README.md: -------------------------------------------------------------------------------- 1 | # Return Statement 2 | ## Return keyword used to give value back at the end of your functions, therefore, you could assign your function CALLS to variables and use their values later 3 | ```python 4 | #Each Function in Python has to give some value back when it completes the execution 5 | #This is designed for assigning the call's of the function to a variable 6 | #And make some uses with this variable in the future 7 | 8 | #This case is going to return nothing, because we did not use return keyword 9 | def square_my_number(num): 10 | print(num ** 2) 11 | 12 | result = square_my_number(num=4) 13 | print(result) 14 | 15 | #So it is equvielant to this: 16 | def square_my_number(num): 17 | print(num ** 2) 18 | return None 19 | 20 | result = square_my_number(num=4) 21 | print(result) 22 | 23 | #But we could decide that we want to store within the result variable the value of 16 24 | #To achieve this, we could write a code like that: 25 | def square_my_number(num): 26 | return num ** 2 27 | 28 | result = square_my_number(num=4) 29 | print(result) 30 | 31 | #Important to remember, that return is a signal for being the last line that will 32 | #execute within a function, so something like this is pointless: 33 | 34 | def square_my_number(num): 35 | return num ** 2 36 | print("One more line to print please") # UNREACHABLE CODE! 37 | 38 | result = square_my_number(num=4) 39 | print(result) 40 | 41 | 42 | ``` 43 | 44 | ## Exercise: 45 | 46 | ### Insert those variables inside a formatted string, describe the print sentence the way you'd like 47 | ```python 48 | favorite_language = "Python" 49 | platform = "Youtube" 50 | channel_name = "JSC" 51 | ``` 52 | 53 | ### Answer: 54 | ```python 55 | #We need to write some print lines starting with f letter before the single/double quotes 56 | print(f"My favorite language now is {favorite_language}") 57 | print(f"I learn about this language on {platform}") 58 | print(f"The course I take now is on the channel of: {channel_name}") 59 | ``` 60 | -------------------------------------------------------------------------------- /32_python_creditcard/32_code.py: -------------------------------------------------------------------------------- 1 | #Python Hide Credit Card Number Exercise 2 | 3 | #Write a program that will behave like a stored credit card on the internet, first 12 digits hidden and the last 4 displayed 4 | 5 | 6 | #Function should replace the first 12 digits 7 | #Of the given number with * 8 | #And display only the last 4 digits 9 | #Final format: **** **** **** 3456 10 | 11 | 12 | def hide_card(card_number): 13 | last_four_digits = card_number[-4:] 14 | return f'**** **** **** {last_four_digits}' 15 | 16 | my_card = hide_card('1234567890123456') 17 | print(my_card) 18 | 19 | 20 | #Addition to a challenge: 21 | #If we want to handle multiple credit cards in this function, what we can do? 22 | 23 | def hide_cards(card_numbers): 24 | cards_list = [] # We create this empty list to fill in items throughout the for loop execution 25 | for card_number in card_numbers: 26 | last_four_digits = card_number[-4:] # This will bring the last_four_digits for each card_number 27 | formatted_credit_card = f"**** **** **** {last_four_digits}" # This will format the cred 28 | cards_list.append(formatted_credit_card) 29 | 30 | return cards_list 31 | 32 | my_card = hide_cards(['1234567890123456','9876543210987654','1594789812345678']) 33 | print(my_card) -------------------------------------------------------------------------------- /32_python_creditcard/README.md: -------------------------------------------------------------------------------- 1 | # Python Hide Credit Card Number Exercise 2 | ## Write a program that will behave like a stored credit card on the internet, first 12 digits hidden and the last 4 displayed 3 | ```python 4 | #Function should replace the first 12 digits 5 | #Of the given number with * 6 | #And display only the last 4 digits 7 | #Final format: **** **** **** 3456 8 | 9 | 10 | def hide_card(card_number): 11 | last_four_digits = card_number[-4:] 12 | return f'**** **** **** {last_four_digits}' 13 | 14 | my_card = hide_card('1234567890123456') 15 | print(my_card) 16 | 17 | 18 | #Addition to a challenge: 19 | #If we want to handle multiple credit cards in this function, what we can do? 20 | 21 | def hide_cards(card_numbers): 22 | cards_list = [] # We create this empty list to fill in items throughout the for loop execution 23 | for card_number in card_numbers: 24 | last_four_digits = card_number[-4:] # This will bring the last_four_digits for each card_number 25 | formatted_credit_card = f"**** **** **** {last_four_digits}" # This will format the cred 26 | cards_list.append(formatted_credit_card) 27 | 28 | return cards_list 29 | 30 | my_card = hide_cards(['1234567890123456','9876543210987654','1594789812345678']) 31 | print(my_card) 32 | ``` -------------------------------------------------------------------------------- /33_classes/33_code.py: -------------------------------------------------------------------------------- 1 | #Classes 2 | 3 | #Classes are definitions/blueprints to a realistic information that you want to maintain through program execution, basically the way to create your customized variable type 4 | 5 | 6 | #Those are the built-in variable types that we learned 7 | #until this point 8 | 9 | #Strings 10 | #Integers 11 | #Floating Numbers 12 | #Booleans 13 | #Lists 14 | #Dictionaries 15 | #Tuples 16 | 17 | #What is so special with those variable types, it is the fact 18 | #that they have their own methods. 19 | 20 | #Now if one day we want to create our own variable type, 21 | #this is something that we can do 22 | #And the following are good candidates for variables types, 23 | #that you might want to create: 24 | 25 | #CreditCard - hide() show() pay() 26 | #Person - talk() run() play() 27 | #Car - drive() stop() park() 28 | 29 | #We can create our own variable types, using Classes 30 | 31 | class CreditCard: 32 | pass 33 | 34 | name = "Jim" #Creating an instance of a string 35 | my_card = CreditCard() #Creating an instance of a CreditCard 36 | 37 | print(type(name)) #will print 38 | print(type(my_card)) #will print 36 | print(type(my_card)) #will print p2_card: 41 | p1.add_point() 42 | elif p2_card > p1_card: 43 | p2.add_point() 44 | else: 45 | print("TIE!") 46 | 47 | if p1.is_game_over() or p2.is_game_over(): 48 | print("Game Over!") 49 | if p1.points > p2.points: 50 | print(f"{p1.name} Wins!") 51 | elif p2.points > p1.points: 52 | print(f"{p2.name} Wins!") 53 | else: 54 | print("Score is TIE!") 55 | 56 | print(f"Final Score: {p1.points} - {p2.points}") 57 | break 58 | 59 | print(f"Score: {p1.points} - {p2.points}") 60 | -------------------------------------------------------------------------------- /39_war_game/README.md: -------------------------------------------------------------------------------- 1 | # Final project of Python Crash Course by Jim Shaped Coding 2 | ## Developing the war (card game) with Python 3 | ```python 4 | 5 | # Game variables: 6 | deck = 10 #Represents the amount of cards for each player 7 | p_won_score = (deck / 2) + 1 8 | 9 | class Player: 10 | def __init__(self, name): 11 | self.name = name 12 | self.points = 0 13 | self.cards = list(range(1, deck + 1, 1)) 14 | 15 | random.shuffle(self.cards) 16 | 17 | def pick_card(self): 18 | picked_card = self.cards[0] 19 | self.cards.remove(picked_card) 20 | print(f"{self.name} card is {picked_card}") 21 | return picked_card 22 | 23 | def add_point(self): 24 | self.points += 1 25 | print(f"A point has been added to {self.name}") 26 | 27 | def is_game_over(self): 28 | return len(self.cards) == 0 or self.points == p_won_score 29 | 30 | p1 = Player(name="Player 1") 31 | p2 = Player(name="Player 2") 32 | 33 | print("Game Starts...") 34 | while True: 35 | input("Press Enter to pick a card!") 36 | p1_card = p1.pick_card() 37 | p2_card = p2.pick_card() 38 | if p1_card > p2_card: 39 | p1.add_point() 40 | elif p2_card > p1_card: 41 | p2.add_point() 42 | else: 43 | print("TIE!") 44 | 45 | if p1.is_game_over() or p2.is_game_over(): 46 | print("Game Over!") 47 | if p1.points > p2.points: 48 | print(f"{p1.name} Wins!") 49 | elif p2.points > p1.points: 50 | print(f"{p2.name} Wins!") 51 | else: 52 | print("Score is TIE!") 53 | 54 | print(f"Final Score: {p1.points} - {p2.points}") 55 | break 56 | 57 | print(f"Score: {p1.points} - {p2.points}") 58 | 59 | ``` -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Python CRASH Course by JimShapedCoding - [Click Here to Start!](https://www.youtube.com/channel/UCU8d7rcShA7MGuDyYH1aWGg) 2 | 3 | ### This Repository includes the code and MORE exercises on each section of the entire course 4 | 5 | After this 5-hour course, you'll have a lot of new information on Programming with Python. 6 | 7 | While you watch the video, feel free to ask questions in the comments section, share your code on different exercises, and give a feedback about the tutorial at all. 8 | 9 | What this course includes ? 10 | - At least 1 Exercise on each section 11 | - 10 on-demand exercises with solutions 12 | - 40 lectures 13 | - Best Practices of how to write efficient code 14 | - Deep explanations about each topic 15 | - Full documentation on the entire tutorial 16 | 17 | What you will learn? 18 | 19 | - Basics: 20 | - Variables 21 | - Useful built-in Functions 22 | - Variables Types & Conversions 23 | - String Methods 24 | - Math Operations 25 | - Working with External Libraries 26 | - Expressions 27 | - Logic: 28 | - Program Conditioning (If/Else/Else If) 29 | - Lists 30 | - List Methods and Indexing 31 | - Dictionaries and its methods 32 | - Range built-in Function 33 | - For Loops 34 | - Debugging your programs 35 | - While Loops and While True 36 | - What are Iterables and Non Iterables 37 | - Functions 38 | - Function Parameters, Default Parameters 39 | - Return Statement 40 | - Object Oriented Programming: 41 | - Classes and Instances 42 | - Instance Attributes 43 | - Constructor, __init__ method 44 | - Why always __self__ 45 | - Class Attributes 46 | 47 | 48 | What you could continue learning after completing this course? 49 | 50 | - Learn more about OOP concepts 51 | - Web Scraping with Python 52 | - Machine Learning 53 | - Web Development with Flask 54 | - Web Development with Django 55 | - Graphical User Interface development with Tkinter / PyQT5 56 | - Developing Games with __pygame__ 57 | - Develop advanced Console applications with argparse 58 | - This list probably has thousands of options, let`s stop here 59 | 60 | 61 | Social Media: 62 | - [Discord](https://discord.com/invite/aMgcPD9) 63 | - [Youtube](https://www.youtube.com/channel/UCU8d7rcShA7MGuDyYH1aWGg) 64 | - [Twitter](https://twitter.com/jimshapedcoding) 65 | - [Instagram](https://www.instagram.com/jimshapedcoding/) 66 | - [My Official Website](http://jimshapedcoding.com) 67 | 68 | --------------------------------------------------------------------------------