Skip to content
CramShare
FreePractice exam

C960 Discrete Math 2 Exam Questions and Complete Solutions .

HEAL100 Health Care — exam and revision material · Other

Updated today

Health Care exam material, 6 pages. Originally published on StudyMerit.

Pages
6
Academic year
2025/2026
Language
English

What’s included

Preview 2 of 6 pages

See the first 2 pages exactly as they appear in the document.

Read page 1 as text

i : i [8 ~~ \ \ 1 a % 3) + 0 ~ G == 11 E( BAS;

Read page 2 as text

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.

Free

With a free account