nerdexam
BCS-ISEB

BH0-010 · Question #10

Given the following sample of pseudo code: 01 Input number of male rabbits 02 Input number of female rabbits 03 If male rabbits > 0 and female rabbits > 0 then 04 Input Do you want to breed (Yes /…

The correct answer is B. male rabbits = 1, female rabbits = 1, breed = "no". See the full explanation below for the reasoning.

Question

Given the following sample of pseudo code:

01 Input number of male rabbits 02 Input number of female rabbits 03 If male rabbits > 0 and female rabbits > 0 then 04 Input Do you want to breed (Yes / No) 05 If breed = "No" 06 Print "Keep male and female rabbits apart!" 07 End if 08 End If. Which of the following test cases will ensure that statement "06" is executed?

Options

  • Amale rabbits = 1, female rabbits = 1, breed = "yes".
  • Bmale rabbits = 1, female rabbits = 1, breed = "no".
  • Cmale rabbits = 1, female rabbits = 2, breed = "yes".
  • Dmale rabbits = 1, female rabbits = 0, breed = "no".

How the community answered

(28 responses)
  • A
    7% (2)
  • B
    82% (23)
  • C
    7% (2)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full BH0-010 Practice