Quiz 2

Quiz Info

Quiz 2 will take place on Tuesday and Wednesday, 6/16 and 6/17, via D2L. You can take the quiz any time between 12am on Tuesday, 6/16 and 11:59 pm Mountain Time on Wednesday, 6/17. 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/17. The quiz will cover the Python topics that we have learned so far: data types, turtle graphics, modules, functions, selection statements, iterative statements, strings, recursion and lists, files, dictionaries, and object oriented programming, with a focus on material that we have learned since the last quiz (files, dictionaries, and object oriented programming.)

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, which will be taken directly from the optional activities found in the reading assignment pages.

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-8 and Programs 1-4). 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 Thursday, June 18th. Even telling a classmate that the quiz was difficult or easy is not acceptable.

Practice quiz

Available on D2L!

Answers:

  1. __init__
  2. class Square(Shape):
  3. a = [1, 2, 3, 4, 5] is creating a list called a, a = "1, 2, 3, 4, 5" is creating a string called a, a =A(1, 2, 3, 4, 5) is creating an objected called a, and a = {"One": 1, "Two": 2, "Three": 3, "Four": 4, "Five": 5} is creating a dictionary called a.
  4. 18
  5. my_list = file.readlines()