Quiz 3

Quiz Info

Quiz 3 will take place on Thursday and Friday, 6/25 and 6/26, via D2L. You can take the quiz any time between 12am on Thursday, 6/25 and 11:59 pm Mountain Time on Friday, 6/26. You will have one hour to complete the short answer and multiple choice portion of the quiz once you start it. You can turn in the coding question as a .py file to the D2L dropbox until 11:59pm Mountain Time on 6/26. The quiz will cover the Python topics and data science topics that we have learned so far: data types, turtle graphics, modules, functions, selection statements, iterative statements, strings, recursion and lists, files, dictionaries, object oriented programming, Numpy, Matploblib, and Pandas, with a focus on material that we have learned since the last quiz (Numpy, Matploblib, and Pandas). If you have been able to complete the lab and programming assignments, you should be able to complete the quiz.

The quiz will consist of two parts. Part 1 will consist of five multiple choice or short answer questions that are similar to the questions found in the textbook. Part 2 will consist of one programming question. Unlike on previous quizes, you may not have seen this question before.

You may use a computer to develop your answers. You may only use the internet to access the interactive Python textbook, the course website (including videos), the Pythontutor code visualizer, the online Python documentation or previous Python programs that you wrote for this course (Labs 1-11 and Programs 1-5). You are encourage to use the IDLE shell and run Python source code.

Once you have viewed the quiz, you may NOT discuss it with anyone until Saturday, June 27th. Even telling a classmate that the quiz was difficult or easy is not acceptable.

Practice quiz

Now on D2L!

Practice quiz answers:

  1. forward is a Turtle method, = is the assignment operator, Turtle() is the Turtle constructor, and alex is a Turtle object.
  2. While loops, for loops, and recursion all let you repeat execution of the same code multiple times.
  3. data.head() is a Pandas data frame.
  4. arr = np.arange(9)
  5. False.

Practice quiz coding question

Download snow_report.py. Add the missing code so that this plot is produced.

Quiz coding question

Download the billionaires dataset from this website. Download quiz3.py. Add the missing code so that this plot is produced. Hint: you can add a legend to your plot by including labels and calling legend().

plt.plot(some_data, label="Label for this data")
plt.legend()

See the matplotlib documentation here.