1 Fall 2017 CS 1110/1111 Exam 3
|
|
- Felicity Annis Turner
- 6 years ago
- Views:
Transcription
1 1 Fall 2017 CS 1110/1111 Exam 3 Bubble in your computing ID in the footer of this page. We use an optical scanner to read it, so fill in the bubbles darkly. If you have a shorter ID, leave some rows blank. In case we have trouble with the scanner, please also legibly print Your name: Your computing ID: Please observe the following directions throughout the exam: Write legibly; we deduct points if we are unsure what you wrote. Indentation and punctuation do matter. Write on the lines, where possible. If you need to insert a line between two you ve written, make it clear that that is what you are doing. We grade one page at a time. Do not spill answers onto another page. Don t add features we didn t request: only print if we ask you to print, etc. Any code we ask you to explain could have an error. If so, write Error in place of the usual answer, and indicate where in the code the error is generated. The exam is being given in multiple locations simultaneously, so we cannot fairly answer student questions during the exam. If you find a question ambiguous or unclear, write that down on your exam next to the question and we ll give it due consideration during grading. 1.1 Pledge [1 pt] On my honor as a student, I have neither given nor received help or assistance on this exam. Signed: 1.2 Bubble [2 pts] Enter your computing ID, one symbol per row, top-to-bottom; if you have a short ID (like up3f) leave a row blank on the appropriate side of the digit row.
2 2 Question [10 pts] Finish the following table. Expression Value Type float '123'[1] len('is a') 2 < 3 4 / 2 (1, 3) 3 Question [6 pts] Finish the following table. Assume the user types 3 each time they are asked for input. Statement Output x x = "2" x = 2 None x = 'hi' x.upper() x = len(input('y: ')) x = list('bac') x.sort() 4 Question [3 pts] What value is assigned to answer after execution of statement answer = ((4 // 8) * (2 ** 2)) / 2? 2
3 5 Question [8 pts] For each loop, give a value for x for which the loop would run forever (e.g., a valid answer format is x = range(1000) ), or write terminates if no such x exists. Note: if you pick a value for x that will cause an error in the code, you will not get credit for that part. while True: if x < 10: break x /= 2 for i in x: if i in x: print(i) i -= 1 while x!= 1110: y = x*x print(y - x) x += 1 while len(x) >= 0: y = x.pop() z = y + 1 x.append(z) Answer: Answer: Answer: Answer: 6 Question [4 pts] Suppose you are asked to test a function named overlap; overlap(a, b) is supposed to return a list of the items that are in both a and b, without duplicates, in the order those items first appear in b. If you could only use four of the following test cases, which four should you pick? Write your four selections letters in the spaces provided, in any order. (There is more than one correct solution to this question) A. overlap([], []) B. overlap([1, 2], [3, 4]) C. overlap([1, 1], []) D. overlap([], [1, 1]) E. overlap([1, 1], [1, 1]) F. overlap([1, 2, 3, 2, 1], [3]) G. overlap([1, 2, 3, 2, 1], [2]) H. overlap([1, 2, 3, 2, 1], [3, 1, 2]) I. overlap([1, 2, 3, 2, 1], [2, 1, 2]) Test case: Test case: Test case: Test case: 7 Question [4 pts] Assume that file.txt does not exist when we first run the following program, and that we then run the program twice in a row. What will file.txt contain after the second run? f = open('file.txt', 'w') print('a line of text', file=f) f.close() 3
4 8 Question [8 pts] Assume noglobal.py defines several functions, none of which use the word global. For each program below, circle could change if it is possible for the function in noglobal to cause the two print statements to print different things or can t change if that can t be the case. import noglobal x, y = 2, 3 print(x, y) noglobal.change1(x, y) print(x, y) import noglobal x = [2, 3] noglobal.change2(x) import noglobal x = "2, 3" noglobal.change3(x) import noglobal x = [1, 2, 4] noglobal.change1(x[1]) could change could change could change could change can t change can t change can t change can t change 9 Question [8 pts] Put True or False in each cell of the following table. Assume the things discussed are non-empty. Note: if we can t tell if you wrote T or F (e.g., TF), we ll mark it wrong. has a first element can have duplicates list str dict s keys dict s values 10 Question [4 pts] Given the following file: Have a happy holidays We hope you enjoyed CS CS > other majors Which one of the following regex expressions will match each of the the first 2 lines, but not the third? A. [A-Z][^A-Z]* B. [A-Za-z ]+ C. [^>] D. [^>]? 4
5 11 Question [10 pts] Below are listed several function and method invocations. In the blanks provided, indicate which ones you d use in what order to open a web page from a URL stored in the variable url and make a list of the commaseparated values of its first line, with no \n at the end of the last cell. For example, if the web page began species,country,population ectopistes migratorius,usa,0 we want to retrieve ['species', 'country', 'population']. Write integers in the blanks below, with 1 for the first invocation you d use, 2 for the second, etc. Leave unused parts blank. You might find it easier to write the code out and then fill in the blanks decode('csv') decode('utf-8') open(url) open("url") read() readline() split() split(',') strip() strip(',') urlopen(url) urlopen("url") 12 Question [9 pts] For each regular expression and example text, put a box around the parts of the example text that finditer would find. For example, if tt was found in 'letter', you d box in 'letter'. re.compile( ).finditer( ) '[1-9][0-9]+' '[^a-za-z]+' '(the) ((a an) [0-9])' 'One can also be written 1, 01, 1.0, and 100e-2' 'Shorter example.' 'an 1 and a 2 and the 3 as well' 13 Question [4 pts] The following code will raise an Exception. On what line will the exception be raised, and what causes it? word = "grumpy" def f(): print(word) word = "happy" print(word) f() print(word) 5
6 14 Question [7 pts] Depending on what the user types, not all of the lines in the following program will be executed. In each of the seven comments in the following program, write A if the commented line runs for All inputs, S if it runs for Some input but not others, and N if it Never runs. try: fname = input('type a file name: ') # thing = open(fname) print('thanks') # except: print('no such file') # def f(x): if x > 0: return x # else: return -x # return 2*x # f(int(input('a number: '))) # 15 Question [4 pts] List two benefits of writing functions when programming. 16 Question [5 pts] Complete the line of code to make the following list: [2, 5, 8, 11] Answer: made = list(range( )) 6
7 17 Question [10 pts] Consider the following gamebox program import pygame import gamebox camera = gamebox.camera(800,600) score = 0 def tick(keys): global score camera.clear('white') score += 1 box = gamebox.from_text(400, 200, "Score is: " + str(score), "Arial", 40, "black") box2 = gamebox.from_text(400, 300, "Keep Playing", "Arial", 40, "black") camera.draw(box) camera.display() ticks_per_second = 40 gamebox.timer_loop(ticks_per_second, tick) Draw what the screen will look like 3 seconds into the program running: 7
8 18 Question [6 pts] What does this code output? def f(x, l=[]): for i in range(x): l.append(i*i) print(l) f(3) f(3, [3, 2, 1]) 19 Question [10 pts] Execution of these two Python statements: print(perimeter("triangle", 3, 1, 5)) print(perimeter("quadrilateral", 4, 3, 1, 2)) produces the output: The triangle's perimeter is 9. The quadrilateral's perimeter is 10. Write function perimeter. 8
9 20 Question [12 pts] Write a program that simulates dealing cards from a 52 card deck to two card players, then displays the cards in each player s hand. In particular, 1. Create the deck, represented by the integers 0 through Shuffle the deck using random.shuffle(deck) (you must use random.shuffle, not some other method; recall that deck must be mutable for random.shuffle(deck) to work). 3. Deal player 1 the first card, player 2 the second, player 1 the third, etc., so that each gets 5 cards. An example output (which will be different each run because of randomness) might be [1, 23, 21, 42, 0] [19, 38, 7, 31, 50] import random 9
10 21 Question [15 pts] Write a program that prompts the user to enter an integer between 1 and 100, inclusive, and stores that integer in a variable named n. The program should ensure that the input is an integer in the specified range. If the user provides a non-integer or an out-of-range integer, display an error message (with a different message for each kind of error) and ask again, continuing until a valid input is provided. 10
Spring 2017 CS 1110/1111 Exam 1
CS 1110/1111 Spring 2017 Exam 1 page 1 of 6 Spring 2017 CS 1110/1111 Exam 1 Bubble in your computing ID in the footer of this page. We use an optical scanner to read it, so fill in the bubbles darkly.
More informationSpring 2017 CS 1110/1111 Exam 3
Spring 2017 CS 1110/1111 Exam 3 Bubble in your computing ID, top to bottom, in the footer of this page. We use an optical scanner to read it, so fill in the bubbles darkly. If you have a shorter ID, leave
More informationSpring 2017 CS 1110/1111 Exam 2
Spring 2017 CS 1110/1111 Exam 2 Bubble in your computing ID in the footer of this page. We use an optical scanner to read it, so fill in the bubbles darkly. If you have a shorter ID, leave some rows blank.
More information(the bubble footer is automatically inserted into this space)
CS 1110 Exam 1, Fall 2018 Page 1 of 8 UVa userid: CS 1110 Exam 1 Name Bubble in your computing ID in the footer of this page. We use an optical scanner to read it, so fill in the bubbles darkly. If you
More informationCS 111X - Spring Final Exam - KEY
CS 111X - Spring 2016 - Final Exam 1/10 Computing ID: CS 111X - Spring 2016 - Final Exam - KEY Name: Computing ID: On my honor as a student, I have neither given nor received unauthorized assistance on
More informationCS 111X - Fall Test 1
CS 111X - Fall 2016 - Test 1 1/9 Computing ID: CS 111X - Fall 2016 - Test 1 Name: Computing ID: On my honor as a student, I have neither given nor received unauthorized assistance on this exam. Signature:
More informationShort Answer Questions (40 points)
CS 1112 Fall 2017 Test 2 Page 1 of 6 Short Answer Questions (40 points) 1. TRUE FALSE You have very legibly printed your name and email id below. Name = EMAILD = 2. TRUE FALSE On my honor, I pledge that
More informationCSE 131 Introduction to Computer Science Fall Exam I
CSE 131 Introduction to Computer Science Fall 2015 Given: 24 September 2015 Exam I Due: End of session This exam is closed-book, closed-notes, no electronic devices allowed. The exception is the sage page
More informationCS 111X - Fall Test 1 - KEY KEY KEY KEY KEY KEY KEY
CS 111X - Fall 2016 - Test 1 1/9 Computing ID: CS 111X - Fall 2016 - Test 1 - KEY KEY KEY KEY KEY KEY KEY Name: Computing ID: On my honor as a student, I have neither given nor received unauthorized assistance
More informationCSE 131 Introduction to Computer Science Fall 2016 Exam I. Print clearly the following information:
CSE 131 Introduction to Computer Science Fall 2016 Given: 29 September 2016 Exam I Due: End of Exam Session This exam is closed-book, closed-notes, no electronic devices allowed The exception is the "sage
More informationCS 1301 Exam 1 Fall 2010
CS 1301 Exam 1 Fall 2010 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in
More informationCS 1301 Exam 2 Fall 2010
CS 1301 Exam 2 Fall 2010 Name : Grading TA: Devices: If your cell phone, pager, PDA, beeper, ipod, or similar item goes off during the exam, you will lose 10 points on this exam. Turn all such devices
More informationCSE 247 Data Structures and Algorithms Fall Exam I
CSE 247 Data Structures and Algorithms Fall 2016 Given: 29 February 2016 Exam I Due: End of session This exam is closed-book, closed-notes. No electronic devices or resources of any kind are allowed. The
More information: Intro Programming for Scientists and Engineers Final Exam
Final Exam Page 1 of 6 600.112: Intro Programming for Scientists and Engineers Final Exam Peter H. Fröhlich phf@cs.jhu.edu December 20, 2012 Time: 40 Minutes Start here: Please fill in the following important
More informationCS 1301 Exam 1 Fall 2010
CS 1301 Exam 1 Fall 2010 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in
More information(f) d={ alchemist :( a, t ), shaman : ( s, n ), wizard : ( w, z )} d[ shaman ][1]
CSCI1101 Final Exam December 18, 2018 Solutions 1. Determine the value and type of each of the expressions below. If the question has two lines, assume that the statement in the first line is executed,
More informationSpring Semester 11 Exam #1 Dr. Dillon. (02/15)
Spring Semester 11 Exam #1 Dr. Dillon. (02/15) Form 1 A Last name (printed): First name (printed): Directions: a) DO NOT OPEN YOUR EXAM BOOKLET UNTIL YOU HAVE BEEN TOLD TO BEGIN. b) You may use one 8.5"
More informationCS 2316 Exam 1 Spring 2014
CS 2316 Exam 1 Spring 2014 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam
More informationPython review. 1 Python basics. References. CS 234 Naomi Nishimura
Python review CS 234 Naomi Nishimura The sections below indicate Python material, the degree to which it will be used in the course, and various resources you can use to review the material. You are not
More informationCPSC 217 Midterm (Python 3 version)
CPSC 217 Midterm (Python 3 version) Duration: 60 minutes 7 March 2011 This exam has 81 questions and 14 pages. This exam is closed book. No notes, books, calculators or electronic devices, or other assistance
More informationPart 1 (80 points) Multiple Choice Questions (20 questions * 4 points per question = 80 points)
EECS 183 Fall 2013 Exam 1 Part 1 (80 points) Closed Book Closed Notes Closed Electronic Devices Closed Neighbor Turn off Your Cell Phones We will confiscate all electronic devices that we see including
More informationCS112 Spring 2012 Dr. Kinga Dobolyi. Exam 2. Do not open this exam until you are told. Read these instructions:
CS112 Spring 2012 Dr. Kinga Dobolyi Exam 2 Do not open this exam until you are told. Read these instructions: 1. This is a closed book exam. No calculators, notes, or other aids are allowed. If you have
More informationCS 1301 Exam 3 Spring 2014
CS 1301 Exam 3 Spring 2014 Name : Section TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam
More informationCSE 131S Introduction to Computer Science Summer SON Exam I
CSE 131S Introduction to Computer Science Summer SON 2014 Exam I Given: 1 July 2014 Due: End of live session This exam is closed-book, closed-notes, no electronic devices allowed except for downloading
More informationCS Name : Grading TA:
CS 1301 Exam 1 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in compliance
More informationCS 1301 Exam 2 A Fall 2015
CS 1301 Exam 2 A Fall 2015 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam
More informationData Bootcamp: Code Practice #2 Revised: November 2, 2016
Data Bootcamp @ NYU Stern Coleman & Lyon Data Bootcamp: Code Practice #2 Revised: November 2, 2016 Answer each of the questions below. What you hand in can be code or handwritten or something else, but
More informationPLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science
PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science DECEMBER 2009 EXAMINATIONS CSC 108 H1F Instructors: Gries, Horton, Zingaro Duration 3 hours PLEASE HAND IN Examination Aids: None Student
More informationCS 170 Exam 2. Version: A Fall Name (as in OPUS) (print): Instructions:
CS 170 Exam 2 Version: A Fall 2015 Name (as in OPUS) (print): Section: Seat Assignment: Instructions: Keep your eyes on your own paper and do your best to prevent anyone else from seeing your work. Do
More informationCS 1301 Exam 1 Spring 2014
CS 1301 Exam 1 Spring 2014 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam
More informationCSE 131 Introduction to Computer Science Fall Exam I
CSE 131 Introduction to Computer Science Fall 2017 Exam I Given: 28 September 2017 Due: End of session This exam is closed-book, closed-notes, no electronic devices allowed. The exception is the sage page
More informationMidterm #1a Fall minutes
15-110 Midterm #1a Fall 2018 50 minutes Name: Andrew ID: @andrew.cmu.edu Section: You may not use any books, notes, or electronic devices during this exam. You may not ask questions about the exam except
More informationCS 1301 Exam 1 Fall 2013
CS 1301 Exam 1 Fall 2013 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in
More informationFinal Exam CS 152, Computer Programming Fundamentals December 9, 2016
Final Exam CS 152, Computer Programming Fundamentals December 9, 2016 Name: NetID: Answer all questions in the space provided. Write clearly and legibly, you will not get credit for illegible or incomprehensible
More informationCS 1301 Exam 1 Spring 2014
CS 1301 Exam 1 Spring 2014 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam
More information15-110: Principles of Computing, Spring 2018
5-: Principles of Computing, Spring 28 Problem Set 8 (PS8) Due: Friday, March 3 by 2:3PM via Gradescope Hand-in HANDIN INSTRUCTIONS Download a copy of this PDF file. You have two ways to fill in your answers:.
More informationCS 1301 Exam 3 Fall 2014
CS 1301 Exam 3 Fall 2014 Name : Section TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in
More informationCS100 Spring 2017 Final
CS100 Spring 2017 Final May 11, 2017 There are 13 questions on this test. Record your answers to the first 10 questions by circling a letter below. Answer questions 11, 12 and 13 on the attached pages.
More informationCSE 131 Introduction to Computer Science Fall Exam I
CSE 131 Introduction to Computer Science Fall 2013 Given: 30 September 2013 Exam I Due: End of session This exam is closed-book, closed-notes, no electronic devices allowed. The exception is the cheat
More informationCS Exam 2 Name: Your Grading TA: This exam has 7 pages including the title page. Please check to make sure all pages are included.
CS1301 - Exam 2 Name: Your Grading TA: Instructions: Please write clearly. What I cannot read, I will not grade. Show all your work in detail. I give partial credit. This exam has 7 pages including the
More information2. Explain the difference between read(), readline(), and readlines(). Give an example of when you might use each.
CMSC 0 Fall 0 Name Final Review Worksheet This worksheet is NOT guaranteed to cover every topic you might see on the exam. It is provided to you as a courtesy, as additional practice problems to help you
More informationCS110 Introduction to Computing Fall 2006 Midterm Exam
CS110 Introduction to Computing Fall 2006 Midterm Exam Name: This is an open book/notes exam. Sharing of notes and books is not permitted. Answer all questions in the space provided. Continue on back of
More informationControl Structures 1 / 17
Control Structures 1 / 17 Structured Programming Any algorithm can be expressed by: Sequence - one statement after another Selection - conditional execution (not conditional jumping) Repetition - loops
More informationCS 2316 Exam 3 Fall 2011
CS 2316 Exam 3 Fall 2011 Name : 1. (2 points) Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking
More informationStructure and Interpretation of Computer Programs Spring 2019 Midterm 2
CS 61A Structure and Interpretation of Computer Programs Spring 2019 Midterm 2 INSTRUCTIONS ˆ You have 2 hours to complete the exam. ˆ The exam is closed book, closed notes, closed computer, closed calculator,
More informationYou may not share any information or materials with classmates during the exam and you may not use any electronic devices.
ICS 31 UC IRVINE FALL 2012 DAVID G. KAY YOUR NAME YOUR LAB: YOUR STUDENT ID (8 DIGITS) SECTION (1-10) YOUR UCINET ID TIME MWF AT: 8 10 12 2 4 6 TA S NAME Second Midterm You have 75 minutes (until the end
More informationCS3330 Spring 2015 Exam 2 Page 1 of 6 ID:
S3330 Spring 2015 xam 2 Page 1 of 6 mail I: S3330 xam 2 Spring 2015 Name: irections: Put the letter of your selection or the short answer requested in the box. Write clearly: if we are unsure what you
More informationUNIVERSITY OF TORONTO SCARBOROUGH. Fall 2015 EXAMINATIONS. CSC A20H Duration 3 hours. No Aids Allowed
Student Number: Last Name: First Name: UNIVERSITY OF TORONTO SCARBOROUGH Fall 2015 EXAMINATIONS CSC A20H Duration 3 hours No Aids Allowed Do not turn this page until you have received the signal to start.
More informationCSE 131 Introduction to Computer Science Fall Exam II
CSE 131 Introduction to Computer Science Fall 2013 Given: 6 November 2013 Exam II Due: End of session This exam is closed-book, closed-notes, no electronic devices allowed. The exception is the cheat sheet
More informationCS 115 Lecture 8. Selection: the if statement. Neil Moore
CS 115 Lecture 8 Selection: the if statement Neil Moore Department of Computer Science University of Kentucky Lexington, Kentucky 40506 neil@cs.uky.edu 24 September 2015 Selection Sometime we want to execute
More informationEECS 270 Midterm Exam
EECS 270 Midterm Exam Fall 2009 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: NOTES: Problem # Points 1 /11 2 /4
More informationFinal Exam COMP Fall 2004 Dec 16, 2004
1. Closed book and closed notes. Final Exam COMP 14-062 Fall 2004 Dec 16, 2004 2. Write all scratch work and answers on the exam itself. If you need extra space, let me know. Indicate your final answer
More informationCS 2316 Exam 3 Spring 2013
CS 2316 Exam 3 Spring 2013 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam
More informationFinal Exam(sample), Fall, 2014
Final Exam(sample), Fall, 2014 Date: Dec 4 th, 2014 Time: 1.25 hours (1.00 a.m. 2:15 p.m.) Total: 100 points + 20 bonus Problem 1 T/F 2 Choice 3 Output Points 16 16 48 4 Programming 20 5 Bonus 20 Total
More informationExam 2, Form A CSE 231 Spring 2014 (1) DO NOT OPEN YOUR EXAM BOOKLET UNTIL YOU HAVE BEEN TOLD TO BEGIN.
Name: Section: Date: INSTRUCTIONS: (1) DO NOT OPEN YOUR EXAM BOOKLET UNTIL YOU HAVE BEEN TOLD TO BEGIN. (2) This exam booklet contains 30 questions, each of which will be weighted equally at 5 points each.
More informationExam 2, Form B CSE 231 Spring 2014 (1) DO NOT OPEN YOUR EXAM BOOKLET UNTIL YOU HAVE BEEN TOLD TO BEGIN.
Name: Section: Date: INSTRUCTIONS: (1) DO NOT OPEN YOUR EXAM BOOKLET UNTIL YOU HAVE BEEN TOLD TO BEGIN. (2) This exam booklet contains 30 questions, each of which will be weighted equally at 5 points each.
More informationCS 2316 Exam 1 Spring 2013
CS 2316 Exam 1 Spring 2013 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam
More informationCS 1301 Exam 2 Fall 2013
CS 1301 Exam 2 Fall 2013 Name : Section TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in
More informationCS164: Midterm I. Fall 2003
CS164: Midterm I Fall 2003 Please read all instructions (including these) carefully. Write your name, login, and circle the time of your section. Read each question carefully and think about what s being
More informationCSCI 150 Exam 2 Solutions
CSCI 150 Exam 2 Solutions 1. Here are definitions of two classes. Give a main( ) function that creates 3 persons: Hagrid, who is a Person, and Harry and Hermione, who are both Students at Hogwarts school.
More informationCS 115 Exam 1, Fall 2015 Thu. 09/24/2015
CS 115 Exam 1, Fall 2015 Thu. 09/24/2015 Name: Section: Rules and Hints You may use one handwritten 8.5 11 cheat sheet (front and back). This is the only additional resource you may consult during this
More informationCSE 160 Winter 2016: Final Exam
Name: Sample Solution Email address (UW NetID): CSE 160 Winter 2016: Final Exam (closed book, closed notes, no calculators) Instructions: This exam is closed book, closed notes. You have 50 minutes to
More informationCPTS 111, Fall 2011, Sections 6&7 Exam 3 Review
CPTS 111, Fall 2011, Sections 6&7 Exam 3 Review File processing Files are opened with the open() command. We can open files for reading or writing. The open() command takes two arguments, the file name
More informationCSE 160 Winter 2016: Final Exam
Name: Email address (UW NetID): CSE 160 Winter 2016: Final Exam (closed book, closed notes, no calculators) Instructions: This exam is closed book, closed notes. You have 50 minutes to complete it. It
More informationCS 1301 Exam 3 Fall 2010
CS 1301 Exam 3 Fall 2010 Name : Grading TA: Devices: If your cell phone, pager, PDA, beeper, ipod, or similar item goes off during the exam, you will lose 10 points on this exam. Turn all such devices
More informationCS 1301 Exam 1 Fall 2013
CS 1301 Exam 1 Fall 2013 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in
More informationCS 1301 Exam 1 Fall 2014
CS 1301 Exam 1 Fall 2014 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in
More informationCS 1301 Exam 2 A Fall 2015
CS 1301 Exam 2 A Fall 2015 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam
More informationUNIVERSITY OF TORONTO SCARBOROUGH. Wnter 2016 EXAMINATIONS. CSC A20H Duration 2 hours 45 mins. No Aids Allowed
Student Number: Last Name: First Name: UNIVERSITY OF TORONTO SCARBOROUGH Wnter 2016 EXAMINATIONS CSC A20H Duration 2 hours 45 mins No Aids Allowed Do not turn this page until you have received the signal
More informationSpring Semester 10 Exam #1 Dr. Dillon. (02/18)
Spring Semester 10 Exam #1 Dr. Dillon. (02/18) Form 1 B Last name (printed): First name (printed): Directions: a) DO NOT OPEN YOUR EXAM BOOKLET UNTIL YOU HAVE BEEN TOLD TO BEGIN. b) You have 80 minutes
More informationCS 1301 Exam 1 Fall 2014
CS 1301 Exam 1 Fall 2014 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in
More informationSpring 2008 June 2, 2008 Section Solution: Python
CS107 Handout 39S Spring 2008 June 2, 2008 Section Solution: Python Solution 1: Jane Austen s Favorite Word Project Gutenberg is an open-source effort intended to legally distribute electronic copies of
More informationOverview of List Syntax
Lists and Sequences Overview of List Syntax x = [0, 0, 0, 0] Create list of length 4 with all zeroes x 4300112 x.append(2) 3 in x x[2] = 5 x[0] = 4 k = 3 Append 2 to end of list x (now length 5) Evaluates
More informationCMSC 201 Fall 2016 Lab 09 Advanced Debugging
CMSC 201 Fall 2016 Lab 09 Advanced Debugging Assignment: Lab 09 Advanced Debugging Due Date: During discussion Value: 10 points Part 1: Introduction to Errors Throughout this semester, we have been working
More informationCS143 Final Spring 2016
CS143 Final Spring 2016 Please read all instructions (including these) carefully. There are 5 questions on the exam, all with multiple parts. This exam is designed to take 2 hours, but you have the full
More informationUniversity of Washington CSE 140 Introduction to Data Programming Winter Midterm exam. February 6, 2013
University of Washington CSE 140 Introduction to Data Programming Winter 2013 Midterm exam February 6, 2013 Name: Solutions UW Net ID (username): This exam is closed book, closed notes. You have 50 minutes
More information(the bubble footer is automatically inserted into this space)
CS 2150 Final Exam, Fall 2016 Page 1 of 10 UVa userid: CS 2150 Final Exam Name You MUST write your e-mail ID on EACH page and bubble in your userid at the bottom of this first page. And put your name on
More informationUniversity of Maryland College Park Dept of Computer Science CMSC106 Fall 2016 Midterm I
University of Maryland College Park Dept of Computer Science CMSC106 Fall 2016 Midterm I Last Name (PRINT): First Name (PRINT): University Directory ID (e.g., umcpturtle) I pledge on my honor that I have
More informationComputer Science E-22 Practice Final Exam
name Computer Science E-22 This exam consists of three parts. Part I has 10 multiple-choice questions that you must complete. Part II consists of 4 multi-part problems, of which you must complete 3, and
More informationAll written answers are limited to their question boxes. Make sure all answers are easily legible.
All written answers are limited to their question boxes. Make sure all answers are easily legible. 1. (1 point) Print your name and email id. 2. (2 points) What makes functions so important? Ability to
More informationLast Name: First Name: Cornell NetID, all caps: CS 1110 Regular Prelim 1 Solutions March 2018
Last Name: First Name: Cornell NetID, all caps: CS 1110 Regular Prelim 1 Solutions March 2018 1. [7 points] What s the point? Consider the Point3 class as it was defined in lecture, with 3 attributes:
More informationCS 1803 Fall 2010 Exam 1
CS 1803 Fall 2010 Exam 1 Name: Your Grading TA: Your Section : INTEGRITY: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking
More informationSpring Semester 09 Exam #2 Dr. Dillon. (04/02)
Spring Semester 09 Exam #2 Dr. Dillon. (04/02) Form 1 A Last name (printed): First name (printed): Directions: a) DO NOT OPEN YOUR EXAM BOOKLET UNTIL YOU HAVE BEEN TOLD TO BEGIN. b) You have 80 minutes
More informationCS 3330 Exam 2 Fall 2017 Computing ID:
S 3330 Fall 2017 Exam 2 Variant page 1 of 8 Email I: S 3330 Exam 2 Fall 2017 Name: omputing I: Letters go in the boxes unless otherwise specified (e.g., for 8 write not 8 ). Write Letters clearly: if we
More informationComputer Science 217
Computer Science 17 Midterm Exam March 5, 014 Exam Number 1 First Name: Last Name: ID: Class Time (Circle One): 1:00pm :00pm Instructions: Neatly print your names and ID number in the spaces provided above.
More informationCS 2316 Exam 4 Fall 2011
CS 2316 Exam 4 Fall 2011 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in
More informationCS150 Sample Final. Name: Section: A / B
CS150 Sample Final Name: Section: A / B Date: Start time: End time: Honor Code: Signature: This exam is closed book, closed notes, closed computer, closed calculator, etc. You may only use (1) the final
More informationMath 1MP3, midterm test February 2017
Math 1MP3, midterm test 2017 17 February 2017 Please write your name, student number, and MacID on this test and on your answer booklet. Please circle your family name, e.g. Fred Q. Student, 00045234,
More informationComputer Science 217
Computer Science 217 Midterm Exam Fall 2012 November 1, 2012 Name: ID: Class Time (Circle One): 1:00pm 3:00pm Instructions: Neatly print your name and ID number in the spaces provided above. Pick the best
More informationUnit 1, Lesson 1: Moving in the Plane
Unit 1, Lesson 1: Moving in the Plane Let s describe ways figures can move in the plane. 1.1: Which One Doesn t Belong: Diagrams Which one doesn t belong? 1.2: Triangle Square Dance m.openup.org/1/8-1-1-2
More informationCS 115 Exam 2 (Section 1) Spring 2017 Thu. 03/31/2017
CS 115 Exam 2 (Section 1) Spring 2017 Thu. 03/31/2017 Name: Rules and Hints You may use one handwritten 8.5 x 11 cheat sheet (front and back). This is the only additional resource you may consult during
More informationCS 1301 Exam 1 Fall 2009
Page 1/6 CS 1301 Fall 2009 Exam 1 Your Name: I commit to uphold the ideals of honor and integrity by refusing to betray the trust bestowed upon me as a member of the Georgia Tech community. CS 1301 Exam
More informationPython Activity 7: Looping Structures WHILE Loops
Python Activity 7: Looping Structures WHILE Loops How can I get my code to repeat output or processes? Learning Objectives Students will be able to: Content: Explain the three parts of a loop Explain the
More informationNote that there are questions printed on both sides of each page!
Math 1001 Name: Fall 2007 Test 1 Student ID: 10/5/07 Time allowed: 50 minutes Section: 10:10 11:15 12:20 This exam includes 7 pages, including this one and a sheet for scratch work. There are a total of
More informationCS 1301 Exam 1 Answers Fall 2009
Page 1/6 CS 1301 Fall 2009 Exam 1 Your Name: I commit to uphold the ideals of honor and integrity by refusing to betray the trust bestowed upon me as a member of the Georgia Tech community. CS 1301 Exam
More informationAll program statements you write should be syntactically correct. Partial credit is not guaranteed with incorrect use of syntax.
With Solutions in Red CS110 Introduction to Computing Fall 2012 Section 2 Exam 1 This is an open notes exam. Computers are not permitted. Your work on this exam must be your own. Answer all questions in
More informationDecision Logic: if, if else, switch, Boolean conditions and variables
CS 1044 roject 4 Summer I 2007 Decision Logic: if, if else, switch, Boolean conditions and variables This programming assignment uses many of the ideas presented in sections 3 through 5 of the course notes,
More informationCS 1110 Prelim 2 November 14th, 2013
CS 1110 Prelim 2 November 14th, 2013 This 90-minute exam has 6 questions worth a total of 100 points. Scan the whole test before starting. Budget your time wisely. Use the back of the pages if you need
More information15-110: Principles of Computing, Spring 2018
15-110: Principles of Computing, Spring 2018 Problem Set 5 (PS5) Due: Friday, February 23 by 2:30PM via Gradescope Hand-in HANDIN INSTRUCTIONS Download a copy of this PDF file. You have two ways to fill
More informationCS3330 Exam 1 Spring Name: CS3330 Spring 2015 Exam 1 Page 1 of 6 ID: KEY
S3330 Spring 2015 xam 1 Page 1 of 6 mail I: KY S3330 xam 1 Spring 2015 Name: irections: Put the letter of your selection or the short answer requested in the box. Write clearly: if we are unsure what you
More information