You are on page 1of 20

Warning Concerning Copyright Restrictions

The Copyright law of the United States (Title 17, United States Code) governs the making of photocopies or other reproductions of copyright material. Under certain conditions specified in the law, libraries and archives are authorized to furnish a photocopy or other reproduction. One of these specified conditions is that the photocopy or reproduction not be "used for any purposes other than private study, scholarship, or research." If a user makes a request for, or later uses, a photocopy or reproduction for purposes in excess of "fair use," that user may be liable for copyright infringement.

Midterm 1

CS105

Fall 2009

September 29th, 2009


DO NOT START UNTIL INSTRUCTED TO DO SO. YOU WILL LOSE POINTS IF YOU START WORKING ON THE TEST BEFORE WE TELL YOU TO.

Do not leave this blankfill it in now:


Name: Discussion Section: TA:

FORM
A

On the scantron:
Use only a #2 pencil; otherwise, your exam won't be graded. Bubble in the Form Letter above!!! Bubble in your name and your NetID!!! Write your TA's name (of the section you attend) in the instructor slot and your section number in the section slot. Your section number is in the table provided at the bottom of this page. The exam consists of 19 pages. Check that your copy is complete, and ask for a replacement if it is not. Make sure you look at all the pages. You will have 1 hour to FILL IN THE SCANTRON for the exam. You may not use any books, notes, or other references for this exam. NO QUESTIONS WILL BE ANSWERED DURING THE EXAM. At the end of the exam, stop writing and put down your pencil when time is called. Hand in both the scantron and all the pages of the exam booklet. NO CALCULATORS OR ELECTRONIC DEVICES OF ANY KIND ARE ALLOWED. TURN OFF CELL PHONES and PAGERS. IF A CELL PHONE RINGS, DO NOT ANSWER IT!!

About the test:


Discussion section numbers and name of the TA whose lab you attend: Time Wednesday Thursday Friday 9:00 am AYE - Ankit AYN - I-Hong 10:00 am AYF - Ankit AYO - Wen 11:00 am AYG - Mianwei AYP - Marina 12:00 pm AYH - Tanmay AYQ - Giang 1:00 pm AYI - Marina AYR - Minas 2:00 pm AYJ - Lance AYS - Minas 3:00 pm AYA - Yunliang AYK - Lance AYT - Xiaokang 4:00 pm AYB - I-Hong AYL - Tanmay AYU - Xiaokang 5:00 pm AYC - Onur AYM - Yunliang 6:00 pm AYD - Onur

Midterm 1

CS105

Fall 2009

Note: Always choose the most correct choice of the answers offered.

Computer Concepts and Logic


1. Which base ten number does the binary number 1010111 correspond to? a. b. c. d. 68 87 89 92

2. If a binary number ends in a 0 then what does two plus that binary number end with? a. b. c. d. 0 1 2 4

3. How many different numbers you can represent with 6 bits? a. b. c. d. 32 64 128 256

Midterm 1

CS105

Fall 2009

Use the following diagram for the NEXT question. (Remember: 0 = False, 1 = True)

4. Which logical operator must be placed in the empty box in order for the logic to output 1? a. b. c. d. AND OR NOT It is impossible to return 1 using AND, OR, or NOT.

Midterm 1

CS105

Fall 2009

Use the following diagram for the NEXT question. (Remember: 0 = False, 1 = True)

5. What does the above logic return? a. b. c. d. 0 1 Infinity 1/2

6. Which of the following is NOT a valid logical equivalence of formulas (where we have used the equal sign = to denote logical equivalence)? a. b. c. d. NOT (A AND B) = (NOT A) OR (NOT B) NOT (A OR B) = (NOT A) AND (NOT B) A OR (NOT A) = NOT A NOT (NOT (NOT A) ) ) = NOT A

Midterm 1

CS105

Fall 2009

7. Complete the truth table for the logical formula A OR (B AND A). (Remember: 0 = False, 1 = True) A 1 1 0 0 a. 1 1 1 0 c. 1 0 1 0 B 1 0 1 0 b. 1 1 0 0 d. 1 1 1 1 A OR (B AND A) ? ? ? ?

8. A computer network that is located within a limited geographical area is called _____. a. b. c. d. the internet TCP/IP a LAN a web site

9. Which of the following statements is FALSE? a. b. c. d. A computer can accept input from a mouse. The keyboard is a common output device. A microphone may be used as an input device. A monitor is a common output device.

10. Data stored here is lost when your computer is turned off. a. b. c. d. Hard drive RAM Flash drive CD

Midterm 1

CS105

Fall 2009

Excel
Use the following screenshot to answer the NEXT TWO questions.

11. What will be displayed in cell D1 if the formula =B1*B2^A2+A1 is entered in cell D1? Hint: from lowest to highest precedence + , - , * , / , ^, - (unary), ()parenthesis a. b. c. d. 13 15 24 37

12. What will be displayed in cell E2 if the formula in D1 is copied and pasted into E2? a. b. c. d. 4 5 13 24

Midterm 1

CS105

Fall 2009

Use the following screenshot to answer the NEXT THREE questions.

13. What will be displayed in cell D1 if the formula =B$2*$C1 is entered in cell D1? a. b. c. d. 6 17 24 25

14. What will be displayed in cell E2 if the formula in D1 is cut and pasted onto E2? a. b. c. d. 6 17 24 25

15. What will be displayed in cell E2 if the formula in D1 is copied and pasted onto E2? a. b. c. d. 6 17 24 25

Midterm 1

CS105

Fall 2009

Use the following screenshot to answer the NEXT TWO questions.

16. We want to enter a formula in cell E2 to compute the total points of a student and then fill the formula into E3:E5. What formula should we enter? a. b. c. d. =B$2+C$2+D$2 =SUM(B2:B5) =SUM(B2:D2) =$B$2+$C$2+$D$2

17. We want to enter a formula in F2 to compute the percentage that a student gets in each homework and then fill the formula to F2:I5. What formula should we enter? a. b. c. d. =$B2/$B7 =B2/B$7 =B2/B7 =B2/$B7

Midterm 1

CS105

Fall 2009

Use the following flowchart to answer the NEXT TWO questions.

A=B
FALSE

TRUE

Result 1

C>D
FALSE

TRUE

Result 1

Result 2

18. What formula describes the above flowchart? a. b. c. d. =IF(A=B, =IF(A=B, =IF(A=B, =IF(A=B, "Result IF(C>D, "Result IF(C>D, 1", IF(C>D, "Result 1", "Result 2")) "Result 1", "Result 2"), "Result 1") 1",= IF(C>D, "Result 1", "Result 2")) "Result 2", "Result 1"),"Result 1")

19. Which of the following formulas is equivalent to the flowchart? a. b. c. d. =IF(A=B OR C>D, "Result 1", "Result 2") =IF(AND(A=B,C>D), "Result 1", "Result 2") =IF(A=B AND C>D, "Result 1", "Result 2") =IF(OR(A=B,C>D), "Result 1", "Result 2")

Midterm 1

CS105

Fall 2009

20. Suppose we have a workbook with two spreadsheets named Price and Surcharge. We want to compute the sum of cell A2 in the Price worksheet and cell B3 in the Surcharge worksheet and display the result in cell D1 in the Surcharge worksheet. What is the correct formula to enter in cell D1 in the Surcharge worksheet? a. b. c. d. = = = = A2 + B3 A2 + Surcharge!B3 A2 + 'Surcharge'!B3 Price!A2 + B3

21. The image of the spreadsheet below is in formula view:

Which cell displays TRUE when the spreadsheet is returned to normal view? a. b. c. d. A1 A2 A3 A4

Midterm 1

CS105

Fall 2009

The NEXT THREE questions refer to the Marginal Tax Rate table below:

22. Person 1 filed with Single status (see column D above).

Which is the correct formula to lookup Person 1s Marginal Tax Rate? a. b. c. d. =VLOOKUP(C14, =HLOOKUP(C14, =VLOOKUP(D14, =HLOOKUP(D14, D4:G8, D4:G8, E4:G8, E3:G8, 4) 3) 2) 1)

23. Which is the value of the formula =HLOOKUP(90000, D6:E7, 2)? a. b. c. d. $82,250 $117,450 $171,550 $190,200

24. The following 3 people file with Head of Household status.

Which formula, entered in cell D23, is suitable for the fill handle to lookup their Marginal Tax Rates by filling across row 23? a. b. c. d. =VLOOKUP(D22, =HLOOKUP(D22, =VLOOKUP(D22, =HLOOKUP(D22, E4:G8, 3) $E4:$G8, 4) $E4:$G8, 3) $E$4:$G$8, 4)

Midterm 1

CS105

Fall 2009

Use the following screenshot to answer the NEXT question.

25. Suppose you want to display the number of players that have more than 30 homeruns in cell B8, what is the correct formula? a. b. c. d. = = = = COUNTIF(B2:B7, ">30") COUNT(B2:B7, ">30") COUNTIF(B2:B7, ">=30") COUNT($B$2:$B$7, ">=30")

Midterm 1

CS105

Fall 2009

VBA
26. In Excel, to use an accelerator, the user would hold down the _____ key and press the accelerator letter. a. b. c. d. Esc Shift Ctrl Alt

27. Which of the following is NOT a type of VBA control object? a. b. c. d. button text box check box formula

28. Which of the following is NOT allowed as the name of a VBA control object? a. b. c. d. MyCmdButton 2ndButton cmdButton MyButton2

29. Which of the following type of characters is NOT allowed in VBA control names? a. b. c. d. upper-case letters (eg, A, B, C, etc) lower-case letters (eg, a, b, c, etc) special characters (eg, !, @, #, etc) numbers (eg, 1, 2, 3, etc)

30. Which mode allows you to create, modify, and code VBA control objects? a. b. c. d. Design Mode Control Mode Active Mode Regular Mode

Midterm 1

CS105

Fall 2009

31. Which of the following is NOT an object method? a. b. c. d. Activate Clear Name Select

Use the following screen shot for the NEXT question.

32. What is the code that generated the above Message Box? a. b. c. d.
MsgBox "Are you having fun?", vbOkCancel, "Are you enjoying the midterm?" MsgBox "Are you having fun?", vbYesNo, "Are you enjoying the midterm?" MsgBox "Are you enjoying the midterm?", vbOkCancel, "Are you having fun?" MsgBox "Are you enjoying the midterm?", vbYesNo, "Are you having fun?"

Midterm 1

CS105

Fall 2009

Use the following screen shot for the NEXT question.

33. In VBA, which line of code will put Hello world in the active cell? a. b. c. d. D3 = "Hello world" Range(4,3).Value = "Hello world" Cells("D3").Value = "Hello world" Cells(3,4).Value = "Hello world"

Midterm 1

CS105

Fall 2009

Use the following screen shot for the NEXT TWO questions.

34. After running the subprocedure cmdChampaign_Click on a blank worksheet, what are the correct values displayed in cells A1, A2 and A3 ? a. b. c. d. A1="Illini", A2="Buffalo Wild Wings", A3="" A1="", A2="Illini", A3="Buffalo Wild Wings" A1="Illini", A2="Illini", A3="Buffalo Wild Wings" A1="", A2="Buffalo Wild Wings", A3=""

35. After running the subprocedure cmdRun_Click on a blank worksheet, what are the correct values displayed in cells A1, A2 and A3 ? a. b. c. d.
A1="Deep A1="Deep A1="Deep A1="Deep dish dish dish dish pizza", pizza", pizza", pizza", A2="Navy Pier", A3="" A2="Illini", A3="Buffalo Wild Wings A2="Navy Pier", A3="Buffalo Wild Wings" A2="Illini", A3 = ""

Midterm 1

CS105

Fall 2009

36. In VBA, what would be the correct code to display an Input Box for the user to enter a number, and then place that number into cell C5? a. b. c. d. Range("C5").Value = InputBox("Enter a number", "Number") InputBox("Enter a number", "Number") = Range("C5").Value ("C5").Value= InputBox("Enter a number", "Number") Range("C5").Value(InputBox("Enter a number", "Number"))

Use the following screen shot for the NEXT question.

37. Which of the following choices assigns 11 to cell B5? a. b. c. d. Range("B5").Value Range("B5").Value Range("B5").Value Range("B5").Value = = = = Range("B2").Value + Cells(2,3).Value Cells(3,2).Value + Cells(3,3).Value Cells(3,2).Value + Cells(2,3).Value Cells(2,2).Value + Range("C3").Value

38. If you wish to change the text displayed on a command button that the user sees. What property of the button do you change? a. b. c. d. Name Caption Text Value

Midterm 1

CS105

Fall 2009

39. Which of the following lines of code will result in cell A1 displaying the string, Jack and Jill went up the hill? a. Range("A1").Value = b. Range("A1").Value = c. Range("A1").Value = & "the" & "hill" d. Range("A1").Value = "went up the hill"
AND("Jack and Jill ", "went up the hill") "Jack and Jill " & "went up the hill" "Jack" & "and" & "Jill" & "went" & "up" _

"Jack and Jill "_

&

Use the following screen shot for the NEXT question.

40. Which VBA code would enable the command button named cmdTest? a. b. c. d. cmdTest.Enabled = True cmdTest.Disabled = False cmdTest.Enabled Test.Enabled

Midterm 1

CS105

Fall 2009

Extra Credit

Extra Credit: You will not lose any points if you get this question wrong. You will, however, gain points if you answer it correctly. The maximum score possible remains 160 points. Use the following screen shot for the NEXT question.

result of clicking Yes

result of clicking No

41. Which subprocedure correctly implements the logic of the above diagram? a.

b.

c.

You might also like