NACE EXAM — Health Care exam material
HEAL100 · Other
HEAL100 Health Care — exam and revision material · Other
Updated today
Health Care exam material, 6 pages. Originally published on StudyMerit.
See the first 2 pages exactly as they appear in the document.
i : i [8 ~~ \ \ 1 a % 3) + 0 ~ G == 11 E( BAS;
143: if-else-statement 1 What is the value of abs after the following lines of code are run? xi=2 If{x>0) abs = x Else abs = x Endtif - Answer; 2 The condition ( x > 0) evaluates to true because the value of x is 2. The line abs := x is executed and the line abs >= -x Is skipped. Therefore the final value of abs is 2. 14.3: f-else-statement 2) What is the value of abs after the following lines of code are run? nied Hix>0) abs ew Else abs x End if - Answes 2 The condition ( x > 0 ) evaluates to faise because the value of x is -2. The fine abs “= x is skipped and the line abs -= -x is executed. Therefore the final value of abs is x, which is (2) = 2. 1.5.2: For-loops Consider the following pseudocode fragment: sum :=0
That’s the free preview
You’ve read 2 of 6 pages. The whole document is yours with a free account, and it stays in your library.
HEAL100 · Other
HEAL100 · Other
HEAL100 · Other
Free
With a free account