Use the code shown in Figure 5-42 to answer Questions 10 through 12. Select Case
ID: 3813882 • Letter: U
Question
Use the code shown in Figure 5-42 to answer Questions 10 through 12. Select Case id Case 1 city = "Chicago" Case 2, 8 city = "San Francisco" Case 5 To 7 city = "Boston" Case Else = City = "N/A" End Select What will the code in Figure 5-42 assign to the city variable when the id variable contains the number 8? a. Boston b. Chicago c. San Francisco d. N/A What will the code in Figure 5-42 assign to the city variable when the id variable contains the number 3? a. Boston b. Chicago c. San Francisco d. N/A What will the code in Figure 5-42 assign to the city variable when the id variable contains the number 6? a. Boston b. Chicago c. San Francisco d. N/AExplanation / Answer
10) option: c because the id contains the number 8 so it goes case 2,8 selects the city san francisco
11)option: d because it goes to else case and selects N/A
12)option: a because it goes to case 5 to 7 block and selects boston as city
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.