Skip to content

sandy502/CaseStudy-Hacker-Statistics

Repository files navigation

CaseStudy-Hacker-Statistics

1. Load in the Data

  • The code imports packages used in Intermediate Python: NumPy, pandas, and Matplotlib.
  • The code also imports data used in the course as DataFrames using the pandas read_csv() function.

challenges:

  • Create a loop that iterates through the brics DataFrame and prints "The population of {country} is {population} million!".

  • Create a histogram of the life expectancies for countries in Africa in the gapminder DataFrame. Make sure your plot has a title, axis labels, and has an appropriate number of bins.

  • Simulate 10 rolls of two six-sided dice. If the two dice add up to 7 or 11, print "A win!". If the two dice add up to 2, 3, or 12, print "A loss!". If the two dice add up to any other number, print "Roll again!".

Releases

No releases published

Packages

No packages published