An Udemy course made by Dr. Angela Yu. We start from Day 16 for OOP studies, which is recommended for intermediate learners.
-
Clone the git repository;
-
Setup a virtual environment (optional;)
-
'''pip install -r requirements.txt'''
-
Choose a folder with a main.py archive, select it and run it.
- Before running the code you may have to select your Python interpreter manually. And if you're using a virtual environment you may have to select it as your interpreter. In this example we used VScode as our IDE, which let you select an interpreter by clicking a non-working import, for example.
The oop-coffe-machine-start folder contains the main.py archive that should be run. The documentation for the coffee machine code that Dr. Angela Yu developed is not present in this repo, but it should be understandable by what's on the main.py archive alone.
The quiz-game-start folder contains the main.py archivbe that should be run. In this folder, it is actually recommended to change the question_model and data archives according to what kind of quiz you'd like to create. By default, it contains a simple True or False quiz which we learn to model on Dr. Angela's course.
Note: if you create a quiz that needs more than the question text and its one answer, you may need to change the quiz_brain class we've created.
Day 18 has some challenges that are comments. To run them, manually comment all challenges except the one you want to run. Pay attention to setup variables that should never be comments, otherwise the code will result in errors. The last challenge should be runnable by default and is presented on the image above.
Note: These challenges focus on logic, instead of the usual OOP the course have been teaching.
Day 19 is a simple game creating challenge, but we were able to advance on organization and Python logic skills.
We create a game based on the classic Snake, using everything we learned until now.
We learn pandas to edit and create csv archives using Python's abilities to open documents with "with" and "open" and to create dictionaries and list in one line by using list and dict comprehension.
We learn about *args, **kwargs and tkinter, creating a simple tkinter project: The miles to km converter and the lb to kg converter.