Python Basics 2024

Comprehensive Python Basics Course from Scratch

Programming Basics & Databases5.0(57)10h 40m60 lectures6 sections

What you'll learn

  • Install Python tools and write your first program
  • Use variables, constants and comments
  • Work with strings and their functions
  • Use arithmetic, logical and comparison operations
  • Write conditions with if
  • Use the while and for loops
  • Work with List and Tuple
  • Work with Set and Dictionary
  • Write Functions and use Lambda

About this course

This course teaches the basics of programming in Python from scratch, a high-level language known for being easy to read and write. You start by installing the tools, then the print function, variables, naming rules, comments and constants, then strings, their functions and joining them, numbers, conversion operations and boolean variables. Next you learn arithmetic, logical and comparison operations and the input function, then conditions with if and nested conditions, then the while and for loops and how to stop and continue them. You also learn data collections: List, Tuple, Set and Dictionary, then Functions, parameters, recursion and Lambda. The course suits beginners who want to learn programming for the first time, or anyone who wants to add Python to their skills. You need no previous programming experience. Each lesson explains one idea with a simple example so you understand it before moving on. By the end, you will be able to write simple Python programs and work with data, conditions, loops and functions with confidence.

Expected outcomes

  • Master programming in Python
  • Understand basic and advanced programming concepts
  • Ability to write professional code
  • Develop programming projects using Python

Learner reviews

These reviews are from learners who bought the content and completed at least 50% of it — there are no reviews from anyone who hasn't gone through the material.
5.0
★★★★★
57 reviews
5★
56
4★
0
3★
1
2★
0
1★
0
  • ★★★★★abdoullahyourunkel·منذ 1 شهرشاهد 53٪

    ممتاز جدا و المعلم يشرح بشكل جيد لذا اقيمه عشرة من عشرة

  • ★★★★★Omar A.·منذ 2 شهرشاهد 50٪
  • ★★★★★Ali A.·منذ 4 شهرشاهد 100٪
  • ★★★★★Mohmed A.·منذ 5 شهرشاهد 100٪

    ادورات رائعه شرح مع الامثله بشكل واضح وبسيط

  • ★★★★★زيد م.·منذ 5 شهرشاهد 100٪

    ممتازة جدا

5 / 6 تقييم

Course content

1

Programming in Python 2024 (Core Tasks)

11 lectures
  1. Installing ToolsExplains setting up the environment for learning React Native: installing needed tools such as Node and Visual Studio Code with some Extensions, and installing a phone app to test the apps built on the computer.12:36
  2. Print FunctionExplains Python's print function for displaying text in the terminal, why text must be inside quotes or Python treats it as an undefined name, and ways to run the file from Visual Studio Code.9:12
  3. VariablesExplains variables in Python as a named box holding a value, how to define one with the assignment operator, and how using it instead of repeating a value lets you change it in one place.8:15
  4. Variable Naming ConventionsExplains Python variable naming rules: no spaces and using underscores, case sensitivity, choosing meaningful names, and the camelCase style.14:50
  5. CommentsExplains code comments, text the compiler ignores that clarifies code for the programmer and teammates, how to write a single-line comment, and placing it at the start of a line or after code.8:42
  6. ConstantsExplains constants, variables whose value should not change, why Python does not truly support them, and the convention of writing their names in capital letters so programmers know not to modify them.6:09
  7. TextExplains the String data type in Python, defining it with single or double quotes, why both exist, and how to print a quote character inside the text.11:15
  8. Text FunctionsIntroduces Python String Methods, such as converting to uppercase, checking whether text is numeric, and stripping spaces from the start and end, since a string is an object with methods.8:30
  9. Merging TextExplains string concatenation in Python using the plus sign between variables with an added space, and using an f-string that places variables in curly braces inside the text.7:32
  10. Numbers and Conversion OperationsExplains numbers in Python: integers and floats, how to find a value's type with type, and converting values between types, including turning a number into a string and back.20:54
  11. Logical VariablesExplains the Boolean type in Python, which holds True or False, using the bool function to test values, and that zero, empty text and an empty list count as False while others count as True.13:00
2

Operations

4 lectures
  1. Arithmetic OperationsExplains arithmetic Operators on variables: addition, subtraction, multiplication, division, floor division and exponentiation, storing the result in a variable, then the Increment and Decrement operations by one.7:21
  2. Logical OperationsExplains the logical operators not, or and and in Python, how they combine several conditions into one expression, and when each one yields True or False.8:03
  3. Comparison OperationsExplains Python comparison operators such as equal, not equal, greater than, less than, and their or-equal forms, and that their result is always a boolean True or False.4:38
  4. Equality OperationsExplains assignment operators in Python, assigning values to several variables on one line, giving several variables one value, and the shorthand forms for updating a variable with an arithmetic operation.7:42
3

Conditions and Iterative Loops

9 lectures
  1. Input FunctionExplains Python's input function for receiving a value from the user and storing it in a variable, with a prompt message, and why the entered value arrives as text, causing errors when added as numbers.14:55
  2. Condition with ifExplains the Python if statement as a way for a program to make decisions, how its block runs only when the condition holds, and why indentation matters for defining the block.13:20
  3. Applying Multiple ConditionsExplains handling several conditions in Python with if, elif and else, how conditions are checked in order so only the matching block runs, with an example comparing two numbers entered by the user.17:17
  4. Nested ConditionsExplains nested conditions in Python, the one-line shorthand for if and else, and placing an if inside another if to test several cases, with a student grades example.11:00
  5. Iterative Loops with whileExplains the Python while loop, which repeats as long as its condition is true, with examples of updating a counter, taking user input until a quit letter is typed, and counting even and odd numbers.23:45
  6. Iterative Loops with forExplains the Python for loop when the range is known in advance, using range with start, end and step, and iterating directly over the items of a list.10:29
  7. Nested Iterative LoopsExplains nested loops in Python, where the inner loop completes its full cycle for each step of the outer loop, with a multiplication table example.9:29
  8. Stopping and Resuming Iterative LoopsExplains the break and continue statements inside Python loops: continue skips the current iteration, break exits the loop, and how they behave in nested loops.11:28
  9. Drawing Shapes Using Iterative LoopsA practical exercise drawing a square and other shapes with a for loop using the external turtle library, through forward and turn-by-angle commands, and running the window with mainloop.13:59
4

Data Aggregates

25 lectures
  1. Data AggregatesIntroduces Collections, which store several values in a single variable, and presents the four built-in types: list, tuple, set and dictionary, with an example of each and why they are used instead of a variable holding one value.5:40
  2. Type One ListIntroduces the Python List collection: storing several items in one variable, accessing an item by its zero-based index, changing values, using len to count items, and nesting lists inside lists.16:38
  3. Accessing All Elements in the ListExplains ways to access Python List elements: positive and negative indexes, slicing a range of items between a start and an end, and checking whether an item exists in the list with the in keyword.9:52
  4. Changing Elements in the ListExplains changing Python List elements: replacing an item by positive or negative index, replacing a range of items with other values, and the difference between assigning a list and a plain string into a slice.7:35
  5. Adding Elements to the ListExplains adding items to a Python List using append to add at the end, insert to add at a specific position, and extend to merge in items from another list or iterable.11:58
  6. Removing Elements from the ListExplains deleting Python List items using remove by value, pop by index or for the last item, del by index, and clear to empty the list, including the error when removing a missing value.8:43
  7. Using Iterative Loops with ListExplains looping over List items with a for loop, either directly by item or by index using range and len, with a quick review of building a new list in a single line.11:55
  8. List ComprehensionExplains List Comprehension in Python as a short way to build a new list from a for loop in one line, with an optional filtering condition, compared with the traditional approach using append.13:29
  9. Sorting Elements Inside ListExplains sorting a List with the sort method, ascending by alphabet or by number, descending order with the reverse parameter, and reversing the current order with the reverse method.7:15
  10. Advanced Topics for Working with ListExplains advanced Python List topics: building a list from user input, turning text into a list with split, and built-in functions such as sorted and sum for working with lists.16:38
  11. The Second Type TupleIntroduces the Tuple collection, defined with parentheses, whose key difference from a List is that its items cannot change after definition, while still allowing index access and repeated items.6:44
  12. Accessing Elements Inside TupleExplains accessing Tuple elements with positive and negative indexes, slicing, and checking membership with in, plus why a Tuple is useful even though it cannot be changed.8:26
  13. Operations on TupleExplains operations possible on a Tuple despite being unchangeable, such as deleting it entirely with del, and modifying it by converting to a List and back, or joining a new tuple to it.10:54
  14. Extracting Elements from TupleExplains unpacking a Tuple by assigning its elements to variables, the need for the variable count to match the element count, and using the asterisk to gather remaining elements into a List.9:22
  15. The Third Type SetIntroduces the Set, the third data collection type: it is unordered, does not allow index access or changing elements, and automatically removes duplicate items.6:21
  16. Accessing Elements Inside SetExplains how to access Set elements: since a Set has no order, index access is impossible, so you loop over it with a for loop or check whether an item exists with in.5:38
  17. Adding Elements to SetExplains adding items to a Set with the add method for a single item and the update method for several items from a Set, List or Tuple, noting that item order is not fixed.7:37
  18. Removing Elements from SetExplains removing items from a Set with remove, discard and pop, the difference between them when the item is missing, then emptying it with clear and deleting the variable itself with del.8:22
  19. The Fourth Type DictionaryIntroduces the Dictionary, the fourth type, which stores data as key and value pairs, is defined with curly braces, is accessed through keys, and where a repeated key keeps its last value.9:12
  20. Accessing Elements Inside DictionaryExplains accessing Dictionary elements through the key in square brackets, and using the keys, values and items methods to list all keys, values or pairs.12:10
  21. Changing Elements Inside DictionaryExplains two ways to change a value in a Dictionary: assigning a new value directly through its key, or using the update method with a key and a new value.5:39
  22. Adding Elements to DictionaryExplains adding new items to a Dictionary by assigning a value to a key that does not exist yet, or by using the update method with a new key and value.3:42
  23. Removing Elements from DictionaryExplains removing items from a Dictionary with pop and popitem, where pop removes an item by its key and popitem removes the last one, then deleting with del and emptying with clear.9:51
  24. Iterative Loops with DictionaryExplains looping over a Dictionary with a for loop to get the keys, then getting values through the key or with the values and items methods, and unpacking each pair into key and value.9:46
  25. ExercisesTwo practice exercises on the Dictionary after covering data collection types: the first stores names and tasks entered by the user, and the second counts how often each letter appears in a word using a dictionary.20:11
5

Functions

9 lectures
  1. Introduction to Functions and Their Basic TypesIntroduces Functions as a block of code that runs only when called, distinguishes built-in from custom functions, and presents the four kinds based on having Parameters and a Return value, with an example of a function with neither.18:47
  2. Functions Without Parameters with Return + Concept of ScopeExplains functions that take no parameters but return a value, how to print or store the returned value, then variable scope, local versus global variables, and the global keyword.13:33
  3. Functions with Parameter and Without Return (Parameters & Arguments)Explains functions that take parameters and return nothing, the difference between a parameter and an argument, and what happens when a function is called without passing it any data.11:15
  4. Default Parameters and Args & KwargsExplains default parameter values in functions, passing an arbitrary number of arguments with args, passing named arguments with kwargs, and when to use each.18:19
  5. Functions with Parameter and with Return (Practical Operations)Explains functions that take parameters and return a value with return, with addition, subtraction and multiplication examples, storing the result in a variable, and the difference between required and optional parameters.8:34
  6. Practical Exercise on Functions (User Input Program)A hands-on functions exercise: a program that asks the user for first and last names, combines them in a function returning the full name, and repeats until the user types a quit letter.13:39
  7. Recursive FunctionsExplains the Recursive Function, which calls itself to split a big problem into smaller ones, with a countdown example, and why a stopping condition is needed to avoid an infinite loop.15:54
  8. Lambda Expression & Anonymous Function – Part OneExplains the Lambda Expression in Python for creating an anonymous, nameless function in one line, its structure of the lambda keyword, parameters, then expression, compared with a regular function that joins two names.14:54
  9. Advanced Lambda: Returning Functions & Higher-Order FunctionsExplains using lambda to return a function from another function, and Higher-Order Functions, with a times example that returns a function multiplying a later value by the number passed in.7:49
6

The Supplements

2 attachments
  1. Download Data Set Section Attachments
  2. Download Functions Section Attachments

Instructor

Eng. Amr Abdel Fattah

Eng. Amr Abdel Fattah

Computer systems engineer specializing in mobile app and website development, with experience in creating popular platforms and web applications.
49.3K views20 courses

This course is part of the diploma

Related courses