Computers and Technology
10.04.2020 16:34
103
393
6
Solved by an expert

Study the code segment below to see what it will output. Values of x and y will

Study the code segment below to see what it will output. Values of x and y will be displayed multiple times during the running of the program, and you might recognize a pattern. From the list of possible outputs listed two (2) are IMPOSSIBLE. Choose the two (2) outputs that are impossible for this code to produce. x <- 0 REPEAT_UNTIL( x
Show Answers
Maya629277
Maya629277
4,5(49 marks)

Complete question is:

Study the code segment below to see what it will output. Values of x and y will be displayed multiple times during the running of the program, and you might recognize a pattern. From the list of possible outputs listed two (2) are IMPOSSIBLE. Choose the two (2) outputs that are impossible for this code to produce.

x <- 0

REPEAT_UNTIL( x = 3 ){

y <- 0

x <- x+1

REPEAT_UNTIL ( y = 3 ){

y <- y+1

DISPLAY( x + ", " + y)

}

}

NOTE: if the condition is TRUE the loop does not execute. For example if x is currently 3 then REPEAT_UNTIL (x=3) will not execute.

0,0 and 2,4 are possible.

1,1 ,, 2,1 and 2,2 not possible.

Explanation:

20171303
20171303
4,6(22 marks)

2. D

3. C

4. D

Explanation:

Popular Questions about the subject: Computers and Technology

Suppose you want to write an if statement with multiple alternatives to...
Computers and Technology
17.06.2020 17:19
Carter is the Web designer for an open source project. He has created a...
Computers and Technology
26.07.2020 08:24
Apatient asks her doctor to send a copy of her records to another medical...
Computers and Technology
09.02.2021 22:17
It is primitive but i cant fathom how a fax machine works it seems we just...
Computers and Technology
30.03.2022 12:50
Computers are able to continue their operation even when problems are present....
Computers and Technology
23.02.2022 05:12
The information system that handles the processing and tracking of transactions...
Computers and Technology
16.11.2021 17:48
Aprovides multiple ports for connecting nodes and is aware of the exact...
Computers and Technology
30.08.2021 15:53
What should I do? The water is not leaking from my air conditioner. I even...
Computers and Technology
30.04.2020 16:25
A person who is always and constantly online...
Computers and Technology
20.12.2022 11:18
is the stupidest website for finding awnsers ever because the stupid Free...
Computers and Technology
02.03.2023 19:25

New questions by subject

How many grams of CO2 and Fe are produced when 114 g of carbon monoxide...
Chemistry
31.10.2021 05:16
30 milies is a vector True False...
Physics
15.01.2021 08:37
What are the three branches of the US government that we re set up under...
History
21.05.2021 23:01
Which of the following sequences represents an arithmetic sequence? -5,...
Mathematics
08.09.2022 10:14
Find the slope of the line 6x + 5y = -5...
Mathematics
28.11.2020 01:41
How do I delete questions that I made on this app will give if it works....
English
28.06.2020 16:17
The federal government has tried to pressure states into accepting national...
Social Studies
22.07.2022 19:21
#
#
#
#
# #

We expand our knowledge with many expert answers