PS11.3 CONTUNUED d. Given the following script [y,z] Fina!Exam (x) function y =1
ID: 2265774 • Letter: P
Question
PS11.3 CONTUNUED d. Given the following script [y,z] Fina!Exam (x) function y =1; = Y 100; else z-100 end end d.1 If w FinalExam (100) 100, what is w? A: w=true B: w=10 | C: w-100 | D: w= false E: None of the others d.2 If [u, v]-FinalExam (0), which of the following is true? A: v>-u; | B: vu; | C: v-u=0 ; | D: v-u; %both>0 | E: None of the others e. Given the Vector Z= [ 10 2 3 4 5 6 7 ] , which of the answers below will yield 34? A: Z[1]; B: Z[2]; C: 2[3];D: Z [4 E: None of the others f. Given the following script, what value will x be, when the loop finishes? for n=1 : 10 xn-1; end A: 1B: 4; C: 9; D: 10E: None of the others g. Given the following script, if x -5 what does y equal? if (x-1) else if (x>1) y-24; else yx*2 end A: 1 B: 10; C:-10; D: 12 E: None of the othersExplanation / Answer
d.
1) w will give a logical value of 0 i.e w=0; which means it is false ==> w=false Option: D
2) u=1 and v=100 ==> v>=u is the answer Option: A
e. Z(3) gives 34. Option: C
f. x gives 9 value ==> x=9 Option: C
g. y = 25 (it goes to else condition and becomes square of x). So, option = E (None of the other)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.