Problem 1 3 points Answer the following questions a A...

This preview shows page 1 - 3 out of 8 pages.

Page 1 of 8 Problem Score 1 ______ (3 points) 2 ______ (4 points) 3 ______ ( 6 points) 4 ______ (3 points) 5 ______ (4 points) 6 ______ (2 points) 7 ______ (2 points) 8 ______ (8 points) TOTAL _______ (32 points) University of California, Irvine Donald Bren School of Information & Computer Sciences ICS 32A Python Programming with Libraries (Accelerated) Midterm This is a closed book and closed notes exam. Do not begin until instructed. You have approximately 80 minutes to complete this exam (the duration of the lecture period). Write answers clearly on the pages of the exam and in the boxes (when appropriate). Name (printed) : _________________________ Signature: _________________________ Student ID: _________________________
ICS 32A, UC Irvine Midterm, Page 2 of 8 Problem 1 (3 points) Answer the following questions. (a) A design choice we discussed in writing Python programs is to make sure to never write code that isn’t in in an if __name__ == ‘__main__’ statement, a class, or a function definition (except for global constants). Why is that the case? Mark an “X” for the answer(s) you choose.
(c)

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture