First create a new directory within your class folder data-a-user-manual
called navigating-python
. Launch Jupyter Labs and create a new Jupyter Notebook in that folder with the filename: navigating-python.ipynb
. You are going to write some Python code to generate information about the historical figure Lucy Parsons.
To replicate best coding practices, you’re going to use alternating Markdown and Code cells in your Jupyter Notebook. Copy and paste each of the following steps into a new Markdown cell that documents in your own words what you’re doing in the following code cell. Then insert a new code cell and write your Python code that completes the task for that step.
- Make new variables for the historical figure Lucy Parsons for her first name, last name, birth year, and the state in which she was born - use her Wikipedia page:
first_name
last_name
birth_year
- Make a new variable
full_name
and assign it a single string value using the variablesfirst_name
andlast_name
. Add a print statement that writes out a full sentence usingfull_name
. - How old was Lucy Parsons during the Haymarket affair? Calculate her age and assign it to a new variable
haymarket_age
. End with a full-sentence print statement answering the question that useshaymarket_age
and an f-string. - Lucy Parsons’s contemporary and rival, Emma Goldman, also has a Wikipedia page. Create variables that capture the number of footnotes for each of their Wikipedia pages. Then write a print statement that compares these two numbers in some way.
Bonus Practice:
- Google a common Python function and use it to count how many characters (letters) are in Lucy Parsons’ full name.
- Use Booleans to determine if
first_name
andbirth_year
are the data type.