One of the cool libraries that Python has is called Colorama. It's a great way to make coding more fun by allowing you to print colored text in your terminal!
In this lab, you will learn the basic commands for changing the text color, background color, and dimming and increasing the brightness of text. You will then put it all together to analyze a text file and see the colorful output in your terminal!
This lab was developed by Rebecca Hu (2023) and Sage Jeon (2022). We hope you have fun!
Begin by installing the colorama library to your computer. Here are the ways you can do it for Mac or PC in your terminal:
Mac:
python3 -m pip install colorama
PC:
py -m pip install colorama
Download the starter file using the link here.
You will see that the lab comes with data from a text file (which is what you will be sorting and filtering through later), in addition to a starter code file named colorama_lab.py. In the code provided to you, you'll notice colorama needs to be initialized and the basic classes need to be imported using