BYU Student Author: @Millie_K_B
Reviewers: @Kyle_Nilsen, @Trent_Barlow
Estimated Time to Solve: 30 Minutes
This is an intro challenge that is part of the Python Learning Path.
We provide the solution to this challenge using:
- Python
Need a program? Click here.
Overview
While scrolling through your social media feed, you come across a compelling, artistic, energetic, viral video of a cougar mascot dancing with a cheer team. (If you’re curious, you can find the video we’re referencing here).
Intrigued, you decide to investigate further, and learn from the caption that the mascot is none other than Cosmo the Cougar! Unfortunately, at that very moment, you must return to your homework investigating Python packages.
Undeterred, you decide to see if Python has any packages that could assist in your research on this mysterious, compelling Cosmo. You’re interested in discovering what university he is from and where that university is located. Then you can quickly transfer your records there, because clearly that school is a fun and exciting place to be!
Instructions
- Open a new Jupyter workbook and import the following packages using pip install:
- Using Ao, pull the articles you think will help you determine where Cosmo’s university is located.
- Using RegEx (and any other tools you’ve learned so far), create a string variable containing the location of Cosmo’s university.
- Print the string variable.
NOTE: Your code does not need to have a prettily formatted output or be extremely efficient to start. The purpose of this challenge is to practice downloading new packages and trying new things in Python. The solution code will provide one example of how to print the location of Cosmo’s university, but we encourage you to spend some time experimenting with these packages, finding alternative ways to code, and increasing your efficiency.
Suggestions and Hints
Always refer back to the package’s project description for help determining how it is best utilized.
For RegEx help, use this link to RegExOne as a reference and for practice writing regular expressions. Or, for more detailed information about RegEx specific to Python’s RegEx package, go here.
This is an example of what a pip install of Ao will look like, for guidance:
Solution