https://github.com/anaisateodoro/python-for-beginners
Python exercises from the Python-3 course in a video on YT
https://github.com/anaisateodoro/python-for-beginners
cursoemvideo-python gustavo-guanabara python-beginners
Last synced: 8 months ago
JSON representation
Python exercises from the Python-3 course in a video on YT
- Host: GitHub
- URL: https://github.com/anaisateodoro/python-for-beginners
- Owner: anaisateodoro
- Created: 2024-01-06T04:18:19.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-10T03:12:04.000Z (over 1 year ago)
- Last Synced: 2025-01-05T22:27:45.397Z (9 months ago)
- Topics: cursoemvideo-python, gustavo-guanabara, python-beginners
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Python Exercises from Python-3 Course in Video on YT
This repository contains a list of exercises I am practicing as part of the Python-3 course on YouTube by Gustavo Guanabara. These exercises are designed to help solidify my understanding of Python concepts and syntax.
1. Variables and Data Types
- Assign values to variables and print them
- Declare variables with different data types (int, float, string, boolean)
- Convert data types using functions like `int()`, `float()`, and `str()`
- Use the `type()` function to check the data type of a variable2. Operators and Expressions
- Use arithmetic operators (+, -, *, /, //) to perform calculations
- Use comparison operators (==, !=, >, <, >=, <=) to compare values
- Use logical operators (and, or, not) to create complex expressions
- Use the `abs()` function to find the absolute value of a number3. Control Flow Statements
- Use if statements to execute code based on conditions
- Use elif statements to provide additional conditions
- Use else statements to execute code when no conditions are met
- Use loops (for and while) to repeat code multiple times4. Functions
- Define functions with parameters and return values
- Call functions and pass arguments
- Use default parameter values
- Use keyword arguments to pass arguments by name5. Lists
- Create lists with elements separated by commas
- Access list elements using indexing
- Modify list elements using indexing
- Use slicing to extract a portion of a list
- Use list methods like `append()`, `insert()`, `remove()`, and `sort()`6. Tuples
- Create tuples with elements separated by commas
- Access tuple elements using indexing
- Cannot modify tuple elements
- Use tuple unpacking to assign multiple variables at once7. Dictionaries
- Create dictionaries with key-value pairs separated by colons
- Access dictionary values using keys
- Modify dictionary values using keys
- Use dictionary methods like `keys()`, `values()`, and `items()`8. File Input/Output
- Open and close files using the `open()` function
- Read file contents using the `read()` method
- Write file contents using the `write()` method
- Append file contents using the `append()` method9. Exception Handling
- Use try-except blocks to handle exceptions
- Use the `try` block to execute code that may raise an exception
- Use the `except` block to handle specific exceptions
- Use the `finally` block to execute code regardless of whether an exception is raised10. Modules and Packages
- Import modules using the `import` statement
- Use module functions and classes
- Use the `__name__` variable to determine if a module is being run directly or imported
- Create packages by creating a directory with an `__init__.py` fileThese exercises cover a wide range of Python concepts and syntax, and I will continue to practice and refine my skills in these areas.
## Ide
- Idle;
- PyCharm -> [productive coding in PyCharm](https://youtu.be/OoxLZILN-uI);