{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Practicum 1 - Friday 13th, 2026" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- Due Date: Friday, February 13 no later than 10:50 a.m.\n", "- Submission Instructions: Upload your solution, entitled **YourFirstName-YourLastName-Practicum1.ipynb** to the \n", "Canvas Practicum 1 Dropbox." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Starting Code" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Only use *datascience* and *numpy* libraries. Do not import anything else." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from datascience import *\n", "import numpy as np\n", "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Data File" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We are going to explore a PGA golf tournament data set that contains results of tournaments\n", "between 2014 and 2022. Download [PGA.csv]\n", "(https://www.cs.montana.edu/paxton/classes/spring-2026/intro-ds/practicums/PGA.csv)\n", "and place it in the same directory as your Jupyter notebook. Each entry in the file contains:\n", "- **player** - The name of a professional golfer\n", "- **par** - the expected total number of strokes needed by a professional golfer\n", "- **strokes** - the number of strokes that player took\n", "- **rounds** - the number of 18 hole rounds of golf the player played\n", "- **made_cut** - whether the player made the cut to play all of the rounds (1 = yes, 0 = no)\n", "- **result** - where the player finished (1 = finished first, 2 = finished second, etc., nan = they didn't make the cut)\n", "- **course** - the name of the golf course\n", "- **date** - the date of the tournament" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Place the csv file in the same directory as this notebook\n", "pga = Table().read_table(\"PGA.csv\")\n", "pga.show(5)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 1" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Part A - 10 points. Scottie Scheffler, who turned pro in 2018, is considered \n", "to be the world's best golfer in 2026.\n", "Rory McIlroy, who turned pro in 2007, is considered to be second best in 2026.\n", "Print out the number of tournaments that Scottie Scheffler entered in\n", "the following format (where dd is an integer):\n", "\n", "*Scottie Scheffler tournaments: dd*" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Part B - 10 points. Print the percentage of tournaments where Scottie Scheffler made the cut in the\n", "following format (where d is an integer):\n", "\n", "*Scottie Scheffler made cut: dd.dd%*" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Part A - 15 points. Create a table the contains two columns: a player's name (name this column **player**) and\n", "the total number of tournaments entered (name this column **tournaments**). Display the first five entries. *Hint:\n", "If done correctly, the first entry will be Aaron Baddeley and 147.*" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Part B - 15 points. Add a column named **cuts_made** that shows how many times a given **player**\n", "made the cut in a tournament. Display the first five entries. *Hint: if done correctly,\n", "the first entry will be Aaron Baddeley, 147 and 79.*" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Part C - 10 points. Add a column named **percent** that shows the percent of the time that a player\n", "made the cut. Format this column with the PercentFormatter.\n", "Display the first five entries. *Hint: if done correctly, the first\n", "entry will be Aaron Baddeley, 147, 79 and 53.74%.*" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Part D - 10 points. Sort the table in descending order by **percent** and\n", "display the first five entries where the player competed in at least\n", "50 tournaments. *Hint: if done correctly, the fifth entry will be Rory \n", "McIlroy whose percent is 87.39%.*" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Part E - 5 points. Provide a reasonable explanation as to why Scottie Scheffler, \n", "who is considered to be the world's best golfer in 2026, is not among the\n", "top 5 players of Part D." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Explanation -**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Part F - 10 points. Display a scatter graph of the table from Part D with **tournaments** on the x-axis and\n", "**cuts_made** on the y-axis. Display a second scatter graph with **tournaments**\n", "on the x-axis and **percent** on the y-axis." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Part G - 5 points. Does the first graph (tournaments, cuts_made) show a strong positive association, \n", "a weak positive association, a strong negative association, a weak negative association\n", "or no association?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Answer with explanation as to why you see the association that you do -**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Part H - 5 points. Does the second graph (tournaments, percent) show a strong positive association, \n", "a weak positive association, a strong negative association, a weak negative association\n", "or no association?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Answer with explanation as to why you see the association that you do -**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Part I - 5 points. Is it a good idea or a bad idea to display the two graphs\n", "in Part F as one *overlaid scatter graph*? Explain." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Answer with explanation -**" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.14.2" } }, "nbformat": 4, "nbformat_minor": 4 }