Welcome to the repository for CS50's Introduction to Programming with Python! This repository contains code files organized by each week's lecture from Week 0 to Week 9. Each week's folder contains specific topics covered in the lectures, including examples and exercises.
The repository is organized as follows:
-
week0/
- Functions: Code examples and exercises related to defining and using functions.
- Variables: Code examples and exercises on variable declaration, assignment, and usage.
-
week1/
- Conditionals: Code examples and exercises involving conditional statements such as
if
,else
, andelif
.
- Conditionals: Code examples and exercises involving conditional statements such as
-
week2/
- Loops: Code examples and exercises on
for
loops,while
loops, and loop control statements.
- Loops: Code examples and exercises on
-
week3/
- Exceptions: Code examples and exercises on handling exceptions using
try
,except
,finally
, and custom exceptions.
- Exceptions: Code examples and exercises on handling exceptions using
-
week4/
- Libraries: Code examples and exercises on importing and using Python libraries.
-
week5/
- Unit Test: Code examples and exercises on writing and running unit tests using the
unittest
module.
- Unit Test: Code examples and exercises on writing and running unit tests using the
-
week6/
- File I/O: Code examples and exercises on reading from and writing to files.
-
week7/
- Regular Expressions: Code examples and exercises on using regular expressions for pattern matching.
-
week8/
- Object-Oriented Programming: Code examples and exercises on classes, objects, inheritance, and other OOP concepts.
-
week9/
- Et Cetera: Miscellaneous topics and advanced concepts covered in the course.
-
Clone the repository:
git clone https://github.com/sumeetbidhan/CS50_Introduction_to_Programming_with_Python_Lecture_Code cd cs50-python
-
Navigate to the week of interest:
cd week1 # Replace `week1` with the desired week folder
-
Run the code examples and exercises: Each file can be executed individually using Python:
python filename.py # Replace `filename.py` with the desired file
Feel free to contribute to this repository by adding new examples, fixing bugs, or improving documentation. Please submit a pull request with your changes and provide a detailed description.
This repository is licensed under the MIT License. See the LICENSE file for more information.
Happy coding and enjoy your journey through CS50's Introduction to Programming with Python! If you have any questions or need further assistance, feel free to open an issue in this repository.