23.05.2017 Views

BIS 311 DeVry Week 3 Quiz

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Question 19. 19. (TCO 5) What value will the following code snippet assign to the variable decPrice when the<br />

variable intPriceCode has the value 2?<br />

Select Case intPriceCode<br />

Case 1 To 2<br />

decPrice = 15.00<br />

Case 3<br />

decPrice = 25.00<br />

Case 4<br />

decPrice = 35.00<br />

Case 5<br />

decPrice = 37.00<br />

Case Else<br />

decPrice = 99.99<br />

End Select (Points : 1)<br />

o 15.00<br />

o 25.00<br />

o 35.00<br />

o 99.99<br />

Question 20. 20. As part of calculating a student’s grade point average (GPA), we want to create a Select Case<br />

statement to assign the correct point value to the variable intPoints based on the student’s letter grade in variable<br />

strGrade (i.e., A = 4 points, B = 3 points, C = 2 points, D = 1 point, F = 0 points). What should go in the blank to complete<br />

the code snippet below?<br />

Select Case strGrade<br />

Case “A”<br />

intPoints = 4<br />

Case “B”<br />

intPoints = 3<br />

Case “C”<br />

intPoints = 2<br />

Case “D”<br />

intPoints = 1<br />

Case Else<br />

intPoints = 0 _____ (Points : 1)<br />

o<br />

o<br />

o<br />

o<br />

End Select<br />

Stop Select<br />

End Case<br />

Close Case

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!