CS 111X - Fall Test 1 - KEY KEY KEY KEY KEY KEY KEY

Size: px
Start display at page:

Download "CS 111X - Fall Test 1 - KEY KEY KEY KEY KEY KEY KEY"

Transcription

1 CS 111X - Fall Test 1 1/9 Computing ID: CS 111X - Fall 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 on this exam. Signature: First, write your name and ID, pledge this test, and bubble your ID on this page. Failure to do so will result in penalty points. This is a closed note, closed book, closed computing device, 50-minute test. You are not to speak with anyone except the instructor or TA for any reason except an emergency during the test. Important: Students may take this test at different times. It is a violation of the Honor Code to talk about the test in any way with a student who has not yet taken it. All questions MUST be answered only on the page on which they are asked (answers on scratch paper or on other pages will not be accepted). Also, hard questions may be mixed with easy questions. If you start a question and it s hard or time-consuming, you might want to save it for the end of the test and go ahead and work on easier problems. State any additional assumptions you make. Good luck! 1 pt for bubbling and pledging

2 CS 111X - Fall Test 1 2/9 Computing ID: Question 1 Primitive Data Types / Casting [34 points] Give the resulting data type and value of each of the following Python expressions. The first one is done for you as an example. If the code would be an error, write error in both blanks. (1 pt. per blank) Expression type value a. 2-3 int -1 b // 8 float 2.2 c. 15 % 5 int 0 d. 4 + float( 5 ) float 9.0 e. int(87.999) int 87 f. 3 ** 3 int 27 g. str(2) + 9 error error h error error i. str(34) str 34 j float 4.0 k str 3355 l. Which of the the following is a syntax error? Which is a runtime error? Which is a logical error? Write syntax, runtime, or logical in the blanks below. (9 pts.) runtime Attempting to access an out-of-range list index. syntax Forgetting a ) at the end of a statement where one is required. logical Adding sales tax value before applying a $5 discount. m. Given the following variables, circle the expression below that evaluates to false. (5 pts.) p = True q = False p or q p or not(q) p and q p and not(q) not(p and q)

3 CS 111X - Fall Test 1 3/9 Computing ID: Question 2 - Python Statements [20 points] a. Given a list called nums, write ONE line of code to add the first and last elements together and store the result in a variable called result. (5 pts.) 1 pt result, 2 pts each for first and last element access result = nums[0] + nums[-1] --or-- result = nums[0] + nums[len(nums)-1] b. Write an if statement that will print Yes! if a number called num is evenly divisible by 3. (5 pts.) if num % 3 == 0: 2 pts if statement, 2 pts % and ==, 1 pt print print( Yes! ) c. Describe the circumstances in which you should use a while loop instead of a for loop. (5 pts.) A while loop is used when you do not necessarily know how many iterations the loop will go. 5 pts = Good answer close to above; 3 pts = Okay answer, mostly like above; 1 pt = lack of understanding d. Convert the following code to one if-elif-else statement with each of the three cases (5 pts.) x = 0 if x > 60 : if x >= 90 : print ( "A" ) if x < 90 and x > 70 : print ( "B" ) if x < 70 : print ( "C" ) else: print ( "D" ) if x >= 90 : print ( "A" ) elif x > 70 : print ( "B" ) elif x <= 60 : print ( "D" ) else : print ( "C" ) 5 pts = good if/elif/else structure and works; 3 pts = works, but structure is off a little; 1 pt = has at least an if and elif somewhere

4 CS 111X - Fall Test 1 4/9 Computing ID: Question 3 - Decision and Control Structures [15 points] a. What is the value of result after this code runs? Write your answer in the box. (5 pts.) x = 5 y = False result = "" if x >= 10 : if not y: result = "medium" else : result = "average" elif x <= 13 : if not y: result = "large" else : result = "big" else : result = "small" large b. Convert the following while loop into a for loop that produces the same output. Write your answer in the box. (5 pts.) i = 7 while i > -3: print (i*i) i -= 1 for i in range ( 7, - 3, - 1 ): print (i*i) 5 pts = for loop works and has same output 3 pts = should have same output, for loop has minor errors 1 pt = there is the word for in it and the line beneath is tabbed in c. What is the output of the following code. Write your answer in the box. (5 pts.) HelloWorld greeting = "Hello, World!" sub = greeting[ : 5] + greeting[7 : len(greeting)-1] -1 if has quotes -1 if has comma -1 if has space

5 CS 111X - Fall Test 1 5/9 Computing ID: print(sub) -1 if has! Question 4 - Programming [30 points] An Online Store Assume you have the following dictionary, where the key is the book title and the value is the price (in US dollars): store = { book1 : 12, book2 : 14, book3 : 15, book4 : 8 } Write a program that simulates an online store ordering system. Your program should prompt the user to add a copy of a book to their order by typing the name of the book or typing quit to finish the order. The program should then print the final total of all items in the order. Note that the program should let the user know if they try to buy a book that doesn t exist in the list. INPUT: The names of books that should be added to the order or quit to print the total and end the program. OUTPUT: The final output is the total of the entire order. EXAMPLE: (match the wording shown here) Add to order (quit to quit): book1 Current total: $12 Add to order (quit to quit): book3 Current total: $27 Add to order (quit to quit): quit Your grand total is $27 Another run might look like this: Add to order (quit to quit): book7 We don't have that book! Add to order (quit to quit): book2 Current total: $14 Add to order (quit to quit): quit Your grand total is $14 Put your answer on the next page. Nothing on this page will be graded.

6 CS 111X - Fall Test 1 6/9 Computing ID:

7 CS 111X - Fall Test 1 7/9 Computing ID: store = { book1 : 12, book2 : 14, book3 : 15, book4 : 8 } done = False total = 0 while not done: book_to_buy = input ( "Add to order (quit to quit): " ) if book_to_buy in store: total += store[book_to_buy] print ( "Current total: $" + str (total)) elif book_to_buy!= "quit" : print ( "We don't have that book!" ) else : done = True print ( "Your grand total is $" + str (total)) 5 pts: loop will loop for user input correctly 5 pts: prompting the user properly 5 pts: checking for book in dictionary 5 pts: adding to the total 5 pts: printing if book not here 5 pts: will print final total correctly

8 CS 111X - Fall Test 1 8/9 Computing ID: Scratch Paper - Nothing on this page will be graded!

9 CS 111X - Fall Test 1 9/9 Computing ID: Scratch Paper - Nothing on this page will be graded!

CS 111X - Fall Test 1

CS 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 information

CS 111X - Spring Final Exam - KEY

CS 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 information

CSE 131 Introduction to Computer Science Fall Exam I

CSE 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 information

CS 1301 Exam 1 Fall 2010

CS 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

CS 1301 Exam 1 Fall 2010

CS 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

Spring 2017 CS 1110/1111 Exam 1

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 information

CS 1301 Exam 1 Answers Fall 2009

CS 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 information

CSE 131 Introduction to Computer Science Fall 2016 Exam I. Print clearly the following information:

CSE 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 information

Part 1 (80 points) Multiple Choice Questions (20 questions * 4 points per question = 80 points)

Part 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 information

CS 1301 Exam 1 Fall 2009

CS 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 information

CSE 131 Introduction to Computer Science Fall Exam I

CSE 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 information

CS Name : Grading TA:

CS 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 information

CS 303E Fall 2011 Exam 2 Solutions and Criteria November 2, Good Luck!

CS 303E Fall 2011 Exam 2 Solutions and Criteria November 2, Good Luck! CS 303E Fall 2011 Exam 2 Solutions and Criteria November 2, 2011 Name: EID: Section Number: Friday discussion time (circle one): 9-10 10-11 11-12 12-1 2-3 Friday discussion TA(circle one): Wei Ashley Answer

More information

CS112 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: 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 information

CSE 131S Introduction to Computer Science Summer SON Exam I

CSE 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 information

CS 1803 Fall 2010 Exam 1

CS 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 information

(the bubble footer is automatically inserted into this space)

(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 information

CS 1301 Exam 1 Fall 2014

CS 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 information

CS 1301 Exam 1 Spring 2011

CS 1301 Exam 1 Spring 2011 CS 1301 Exam 1 Spring 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

More information

CS 2316 Exam 1 Spring 2014

CS 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 information

CS 1301 Exam 3 Spring 2014

CS 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 information

CS 1301 Exam 2 Fall 2010

CS 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 information

CSE 131 Introduction to Computer Science Fall Exam I

CSE 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 information

CS 1301 Exam 2 Fall 2014

CS 1301 Exam 2 Fall 2014 CS 1301 Exam 2 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 information

CS 1301 Exam 1 Fall 2014

CS 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 information

CS 1301 Exam 2 Fall 2013

CS 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 information

CS 1803 Fall 2010 Exam 1

CS 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 information

CS 1301 Exam 3 Fall 2014

CS 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 information

CS 1301 Exam 1 Spring 2014

CS 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 information

CS 115 Lecture 8. Selection: the if statement. Neil Moore

CS 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 information

CS 1301 Exam 1 Spring 2014

CS 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 information

CS 2316 Exam 4 Fall 2011

CS 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 information

CS 2316 Exam 1 Spring 2013

CS 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 information

: Intro Programming for Scientists and Engineers Final Exam

: 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 information

CSE 131 Introduction to Computer Science Fall Exam II

CSE 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 information

CS125 : Introduction to Computer Science. Lecture Notes #4 Type Checking, Input/Output, and Programming Style

CS125 : Introduction to Computer Science. Lecture Notes #4 Type Checking, Input/Output, and Programming Style CS125 : Introduction to Computer Science Lecture Notes #4 Type Checking, Input/Output, and Programming Style c 2005, 2004, 2002, 2001, 2000 Jason Zych 1 Lecture 4 : Type Checking, Input/Output, and Programming

More information

Name Feb. 14, Closed Book/Closed Notes No electronic devices of any kind! 3. Do not look at anyone else s exam or let anyone else look at yours!

Name Feb. 14, Closed Book/Closed Notes No electronic devices of any kind! 3. Do not look at anyone else s exam or let anyone else look at yours! Name Feb. 14, 2018 CPTS 111 EXAM #1 Closed Book/Closed Notes No electronic devices of any kind! Directions: 1. Breathe in deeply, exhale slowly, and relax. 2. No hats or sunglasses may be worn during the

More information

CS 1803 Pair Homework 3 Calculator Pair Fun Due: Wednesday, September 15th, before 6 PM Out of 100 points

CS 1803 Pair Homework 3 Calculator Pair Fun Due: Wednesday, September 15th, before 6 PM Out of 100 points CS 1803 Pair Homework 3 Calculator Pair Fun Due: Wednesday, September 15th, before 6 PM Out of 100 points Files to submit: 1. HW3.py This is a PAIR PROGRAMMING Assignment: Work with your partner! For pair

More information

CS 1301 Exam 3 Spring 2012

CS 1301 Exam 3 Spring 2012 CS 1301 Exam 3 Spring 2012 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 information

University of Michigan EECS 183: Elem. Programming Concepts Fall 2011 Exam 1: Part 1: Form 1. Professors: ML Dorf, Elliot Soloway

University of Michigan EECS 183: Elem. Programming Concepts Fall 2011 Exam 1: Part 1: Form 1. Professors: ML Dorf, Elliot Soloway University of Michigan EECS 183: Elem. Programming Concepts Fall 2011 Exam 1: Part 1: Form 1 Professors: ML Dorf, Elliot Soloway Wed 9- February- 2011 35 questions * 3 pts each = 105 pts (yes we know there

More information

CS 1301 Exam 1 Fall 2013

CS 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 information

CS 2316 Exam 4 Fall 2011

CS 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 information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

CSE 247 Data Structures and Algorithms Fall Exam I

CSE 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

University 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 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 information

Decision Logic: if, if else, switch, Boolean conditions and variables

Decision 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 information

Do not start the test until instructed to do so!

Do not start the test until instructed to do so! CS 1054: Programming in Java Page 1 of 6 Form A READ THIS NOW! Failure to read and follow the instructions below may result in severe penalties Failure to adhere to these directions will not constitute

More information

Multiple Choice Questions (20 questions * 6 points per question = 120 points)

Multiple Choice Questions (20 questions * 6 points per question = 120 points) EECS 183 Fall 2014 Exam 2 Closed Book Minimal Notes Closed Electronic Devices Closed Neighbor Turn off Your Cell Phones We will confiscate all electronic devices that we see including cell phones, calculators,

More information

CS 1110, LAB 1: PYTHON EXPRESSIONS.

CS 1110, LAB 1: PYTHON EXPRESSIONS. CS 1110, LAB 1: PYTHON EXPRESSIONS Name: Net-ID: There is an online version of these instructions at http://www.cs.cornell.edu/courses/cs1110/2012fa/labs/lab1 You may wish to use that version of the instructions.

More information

CS 1301 Exam 1 Spring 2015

CS 1301 Exam 1 Spring 2015 CS 1301 Exam 1 Spring 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 information

Reviewing all Topics this term

Reviewing all Topics this term Today in CS161 Prepare for the Final Reviewing all Topics this term Variables If Statements Loops (do while, while, for) Functions (pass by value, pass by reference) Arrays (specifically arrays of characters)

More information

Spring 2017 CS 1110/1111 Exam 2

Spring 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

PREPARING FOR PRELIM 1

PREPARING FOR PRELIM 1 PREPARING FOR PRELIM 1 CS 1110: FALL 2012 This handout explains what you have to know for the first prelim. There will be a review session with detailed examples to help you study. To prepare for the prelim,

More information

The American University in Cairo Department of Computer Science & Engineering CSCI &09 Dr. KHALIL Exam-I Fall 2011

The American University in Cairo Department of Computer Science & Engineering CSCI &09 Dr. KHALIL Exam-I Fall 2011 The American University in Cairo Department of Computer Science & Engineering CSCI 106-07&09 Dr. KHALIL Exam-I Fall 2011 Last Name :... ID:... First Name:... Form I Section No.: EXAMINATION INSTRUCTIONS

More information

CS 1301 Exam 1 Fall 2013

CS 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 information

CS 2316 Exam 3 Fall 2011

CS 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 information

Python review. 1 Python basics. References. CS 234 Naomi Nishimura

Python 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 information

CS 141, Lecture 3. Please login to the Math/Programming profile, and look for IDLE (3.4 or the unnumbered. <-- fine <-- fine <-- broken

CS 141, Lecture 3. Please login to the Math/Programming profile, and look for IDLE (3.4 or the unnumbered. <-- fine <-- fine <-- broken CS 141, Lecture 3 Please login to the Math/Programming profile, and look for IDLE (3.4 or the unnumbered one are fine)

More information

1. The programming language C is more than 30 years old. True or False? (Circle your choice.)

1. The programming language C is more than 30 years old. True or False? (Circle your choice.) Name: Section: Grade: Answer these questions while viewing the assigned videos. Not sure of an answer? Ask your instructor to explain at the beginning of the next class session. You can then fill in your

More information

CS 1301 Exam 1 Fall 2011

CS 1301 Exam 1 Fall 2011 CS 1301 Exam 1 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 information

(the bubble footer is automatically inserted into this space)

(the bubble footer is automatically inserted into this space) CS 2150 Final Exam, spring 2016 Page 1 of 10 UVa userid: CS 2150 Final Exam, spring 2016 Name You MUST write your e-mail ID on EACH page and bubble in your userid at the bottom of this first page. And

More information

CS 1301 Exam 2 A Fall 2015

CS 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 information

CS Exam 2 Name: Your Grading TA: This exam has 7 pages including the title page. Please check to make sure all pages are included.

CS 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 information

CS1114 Spring 2015 Test ONE ANSWER KEY. page 1 of 8 pages (counting the cover sheet)

CS1114 Spring 2015 Test ONE ANSWER KEY. page 1 of 8 pages (counting the cover sheet) CS1114 Spring 2015 Test ONE ANSWER KEY page 1 of 8 pages (counting the cover sheet) For the following questions, use these variable definitions a = 36 b = 3 c = 12 d = '3' What is the type and value of

More information

CMSC 201 Fall 2018 Python Coding Standards

CMSC 201 Fall 2018 Python Coding Standards CMSC 201 Fall 2018 Python Coding Standards The purpose of these coding standards is to make programs readable and maintainable. In the real world you may need to update your own code more than 6 months

More information

CS 2316 Exam 4 Fall 2012

CS 2316 Exam 4 Fall 2012 CS 2316 Exam 4 Fall 2012 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 information

CS 101 Spring 2007 Midterm 2 Name: ID:

CS 101 Spring 2007 Midterm 2 Name:  ID: You only need to write your name and e-mail ID on the first page. This exam is CLOSED text book, closed-notes, closed-calculator, closed-neighbor, etc. Questions are worth different amounts, so be sure

More information

Spring 2017 CS 1110/1111 Exam 3

Spring 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 information

Please write your answers clearly and neatly we can t give you credit if we can t decipher what you ve written.

Please write your answers clearly and neatly we can t give you credit if we can t decipher what you ve written. ICS 31 UC IRVINE FALL 2014 DAVID G. KAY YOUR NAME YOUR LAB: YOUR STUDENT ID (8 DIGITS) SECTION (1-16) ******************** YOUR UCINET ID TIME MWF AT: 8A 10 12 2 4 6 8P ****** K E Y ****** TA S NAME ********************

More information

Question Possible Points Earned Points Graded By GUI 22 SQL 24 XML 20 Multiple Choice 14 Total Points 80

Question Possible Points Earned Points Graded By GUI 22 SQL 24 XML 20 Multiple Choice 14 Total Points 80 CS 1803 Spring 2011 Exam 3 KEY Name: Section: 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 information

CPSC 211, Sections : Data Structures and Implementations, Honors Final Exam May 4, 2001

CPSC 211, Sections : Data Structures and Implementations, Honors Final Exam May 4, 2001 CPSC 211, Sections 201 203: Data Structures and Implementations, Honors Final Exam May 4, 2001 Name: Section: Instructions: 1. This is a closed book exam. Do not use any notes or books. Do not confer with

More information

CSE 131 Introduction to Computer Science Fall Exam III

CSE 131 Introduction to Computer Science Fall Exam III CSE 131 Introduction to Computer Science Fall 2013 Exam III Given: 13 December 2013 Due: End of exam period This exam is closed-book, closed-notes, no electronic devices allowed. The exception is the cheat

More information

Multiple Choice (Questions 1 13) 26 Points Select all correct answers (multiple correct answers are possible)

Multiple Choice (Questions 1 13) 26 Points Select all correct answers (multiple correct answers are possible) Name Closed notes, book and neighbor. If you have any questions ask them. Notes: Segment of code necessary C++ statements to perform the action described not a complete program Program a complete C++ program

More information

CS 2316 Exam 4 Spring 2013

CS 2316 Exam 4 Spring 2013 CS 2316 Exam 4 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 information

CS 112: Intro to Comp Prog

CS 112: Intro to Comp Prog CS 112: Intro to Comp Prog Importing modules Branching Loops Program Planning Arithmetic Program Lab Assignment #2 Upcoming Assignment #1 Solution CODE: # lab1.py # Student Name: John Noname # Assignment:

More information

CS 110 Exam 2 Spring 2011

CS 110 Exam 2 Spring 2011 CS 110 Exam 2 Spring 2011 Name (print): 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 information

Question 1. Part (a) Simple Syntax [1 mark] Circle add_ints(), because it is missing arguments to the function call. Part (b) Simple Syntax [1 mark]

Question 1. Part (a) Simple Syntax [1 mark] Circle add_ints(), because it is missing arguments to the function call. Part (b) Simple Syntax [1 mark] Note to Students: This file contains sample solutions to the term test together with the marking scheme and comments for each question. Please read the solutions and the marking schemes and comments carefully.

More information

CS 216 Exam 1 Fall SOLUTION

CS 216 Exam 1 Fall SOLUTION CS 216 Exam 1 Fall 2004 - SOLUTION Name: Lab Section: Email Address: Student ID # This exam is closed note, closed book. You will have an hour and fifty minutes total to complete the exam. You may NOT

More information

Computer Science CS221 Test 2 Name. 1. Give a definition of the following terms, and include a brief example. a) Big Oh

Computer Science CS221 Test 2 Name. 1. Give a definition of the following terms, and include a brief example. a) Big Oh Computer Science CS221 Test 2 Name 1. Give a definition of the following terms, and include a brief example. a) Big Oh b) abstract class c) overriding d) implementing an interface 10/21/1999 Page 1 of

More information

Lecture 1. Course Overview, Python Basics

Lecture 1. Course Overview, Python Basics Lecture 1 Course Overview, Python Basics We Are Very Full! Lectures are at fire-code capacity. We cannot add sections or seats to lectures You may have to wait until someone drops No auditors are allowed

More information

Multiple Choice Questions (20 questions * 5 points per question = 100 points)

Multiple Choice Questions (20 questions * 5 points per question = 100 points) EECS 183 Winter 2014 Exam 1 Closed Book Closed Notes Closed Electronic Devices Closed Neighbor Turn off Your Cell Phones We will confiscate all electronic devices that we see including cell phones, calculators,

More information

Chapter 5 Conditional and Iterative Statements. Statement are the instructions given to the computer to perform any kind of action.

Chapter 5 Conditional and Iterative Statements. Statement are the instructions given to the computer to perform any kind of action. Chapter 5 Conditional and Iterative Statements Statement Statement are the instructions given to the computer to perform any kind of action. Types of Statement 1. Empty Statement The which does nothing.

More information

CS 2604 Minor Project 1 DRAFT Fall 2000

CS 2604 Minor Project 1 DRAFT Fall 2000 RPN Calculator For this project, you will design and implement a simple integer calculator, which interprets reverse Polish notation (RPN) expressions. There is no graphical interface. Calculator input

More information

Fundamentals of Programming (Python) Getting Started with Programming

Fundamentals of Programming (Python) Getting Started with Programming Fundamentals of Programming (Python) Getting Started with Programming Ali Taheri Sharif University of Technology Some slides have been adapted from Python Programming: An Introduction to Computer Science

More information

CS 455 Midterm Exam 1 Spring 2011 [Bono] Feb. 17, 2011

CS 455 Midterm Exam 1 Spring 2011 [Bono] Feb. 17, 2011 Name: USC loginid (e.g., ttrojan): CS 455 Midterm Exam 1 Spring 2011 [Bono] Feb. 17, 2011 There are 4 problems on the exam, with 50 points total available. There are 7 pages to the exam, including this

More information

You may not share any information or materials with classmates during the exam and you may not use any electronic devices.

You 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 information

CS 1044 Programming in C++ Test 1 READ THIS NOW! Failure to read and follow the instructions below may result in severe penalties.

CS 1044 Programming in C++ Test 1 READ THIS NOW! Failure to read and follow the instructions below may result in severe penalties. READ THIS NOW! Failure to read and follow the instructions below may result in severe penalties. Print your name in the space provided below. Print your name and ID number on the Opscan form and code your

More information

CS 1301 Exam 3 Fall 2010

CS 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 information

Java Bytecode (binary file)

Java Bytecode (binary file) Java is Compiled Unlike Python, which is an interpreted langauge, Java code is compiled. In Java, a compiler reads in a Java source file (the code that we write), and it translates that code into bytecode.

More information

CSCI 136 Data Structures & Advanced Programming. Fall 2018 Instructors Bill Lenhart & Bill Jannen

CSCI 136 Data Structures & Advanced Programming. Fall 2018 Instructors Bill Lenhart & Bill Jannen CSCI 136 Data Structures & Advanced Programming Fall 2018 Instructors Bill Lenhart & Bill Jannen Administrative Details Class roster: Who s here? And who s trying to get in? Handout: Class syllabus Lecture

More information

1 Truth. 2 Conditional Statements. Expressions That Can Evaluate to Boolean Values. Williams College Lecture 4 Brent Heeringa, Bill Jannen

1 Truth. 2 Conditional Statements. Expressions That Can Evaluate to Boolean Values. Williams College Lecture 4 Brent Heeringa, Bill Jannen 1 Truth Last lecture we learned about the int, float, and string types. Another very important object type in Python is the boolean type. The two reserved keywords True and False are values with type boolean.

More information

CS 2316 Exam 3 Fall 2012

CS 2316 Exam 3 Fall 2012 CS 2316 Exam 3 Fall 2012 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 information

Comp Exam 1 Overview.

Comp Exam 1 Overview. Comp 170-400 Exam 1 Overview. Resources During the Exam The exam will be closed book, no calculators or computers, except as a word processor. In particular no Python interpreter running in a browser or

More information

Question: Total Points: Score:

Question: Total Points: Score: CS 170 Exam 2 Section 005 Spring 2015 Name (print): ˆ Instructions: Keep your eyes on your own paper and do your best to prevent anyone else from seeing your work. Do NOT communicate with anyone other

More information

1 Fall 2017 CS 1110/1111 Exam 3

1 Fall 2017 CS 1110/1111 Exam 3 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.

More information

Question: Total Points: Score:

Question: Total Points: Score: CS 170 Exam 1 Section 003 Fall 2013 Name (print): Instructions: Keep your eyes on your own paper and do your best to prevent anyone else from seeing your work. Do NOT communicate with anyone other than

More information

Duke Law Exam Information Fall 2018

Duke Law Exam Information Fall 2018 Duke Law Exam Information Fall 2018 Duke Law uses Electronic Blue Book exam software for in-class exams. Handwriting is an option for students who would rather handwrite. Bluebooks are offered by proctors

More information

Fall 2002 Page 1 of 9 READ THIS NOW!

Fall 2002 Page 1 of 9 READ THIS NOW! Fall 2002 Page 1 of 9 READ THIS NOW! Failure to read and follow the instructions below may result in severe penalties. Failure to adhere to these directions will not constitute an excuse or defense. Print

More information

Python 1: Intro! Max Dougherty Andrew Schmitt

Python 1: Intro! Max Dougherty Andrew Schmitt Python 1: Intro! Max Dougherty Andrew Schmitt Computational Thinking Two factors of programming: The conceptual solution to a problem. Solution syntax in a programming language BJC tries to isolate and

More information

CS 2316 Exam 3 Spring 2013

CS 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 information