CHAPTER 3 critical thinking

CHAPTER 3 critical thinking - CHAPTER 3 Critical Thinking 1...

This preview shows pages 1–2. Sign up to view the full content.

CHAPTER 3: Critical Thinking 1. a) Identifiers: * Letter * Dollar sign * Underscore * No numbers 2. a) dim numCards as integer numCards = 5 b) dim numCards as integer =5 3. a) 13 b) 11 4. Its mainly used to obtain user input. 5. The Val function is used to prevent any run time errors if the text box contains info that doesn't match the code. 6. a) Prompt b) Text boxes should use labels near them to give a heads up to what the output is going to be. 7. a) Integer b) Decimal c) Integer d) string e) Boolean f) Char 8. a) Local b) 9. a)8 b)8 c)4 d)6 e)12 10. x=2005 then y=0, x=1776 then y=7, x=39 then y=3. 11.a) Integer b) double c)string d) integer 12.a) run time error - Dim num As integer = 6 b) syntax error - num = Val(Me.txtNum.Text) c) syntax error - Me.lblOutput.Text = message d) logic error - avg = (test1 + test2) / 2 e) logic error - Dim numberTests As Integer = 2 f) syntax error - Me.lblEmptySeats.Text = MAX _ CLASS _ SIZE + currentSize 13. 0 14.a) A = l*w b) P=(R+C)/N c) A=(h*(b1+b2))/N d) V = (4 / 3) * PI * r ^ 3 e) A = (F + S + T) / 3 f) P = (5 * F) / (4 * d ^ 2) g) A = P + P * r * t h) M = (P * r * (1 + r) ^ n) / ((1 + r) ^ n - 1)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern