[Year 12 SofDev] SD VITTA exam 2, multichoice #1

Frank Van Den Boom vandenboomfj at aquinas.vic.edu.au
Fri Oct 12 12:32:52 EST 2007


Not sure if I clearly understand why you think Do..While tests at the
bottom of the loop.
When option A states it as "Do..While", it is not meant to imply that
the "Do" bit is at the top and the "While" bit at the bottom - both of
these bits are in the statement at the top of the loop. Eg. As well as
the old While/Wend, VB also offers the following

Do While Count < 10
..
..
Loop

In Pascal, it was done something like:
While Count < 10
Begin
..
..
End

I remember reading years ago, that some classic programmers would always
use a while loop in place of a repeat loop as a matter of principle to
cover the possibility that you don't want the loop entered at all.

Frank
-----Original Message-----
From: sofdev-bounces at edulists.com.au
[mailto:sofdev-bounces at edulists.com.au] On Behalf Of Mark Kelly
Sent: Friday, 12 October 2007 11:59 AM
To: Year 12 Software Development Teachers' Mailing List
Subject: [Year 12 SofDev] SD VITTA exam 2, multichoice #1

I'm curious what others think...

"Testing at the 'top of the loop' is performed by which syntax in
pseudo-code?

A. Do..While
B. Do..Until
C. For..Next
D. EOF"

The suggested answer given is A, with the explanation that 'Do..Until is
often referred to as testing at the bottom of the loop...'

But surely both do..while and do..until both test at the bottom of the
loop.

A While..Wend, on the other hand, tests at the top.

--
Mark Kelly
Manager - Information Systems
McKinnon Secondary College
McKinnon Rd McKinnon 3204, Victoria, Australia Direct line / Voicemail:
8520 9085 School Phone +613 8520 9000 School Fax +613 95789253 kel AT
mckinnonsc.vic.edu.au

Webmaster - http://www.mckinnonsc.vic.edu.au IT Lecture notes:
http://vceit.com
Moderator: IT Applications Mailing List

You'll know when we are officially a civilised race: our schools have
all the money they need and the Air Force has to run a chook raffle to
buy a new bomber.

_______________________________________________
http://www.edulists.com.au
IT Software Development Mailing List kindly supported by
http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment
Authority and
http://www.vitta.org.au/vce/studies/infotech/softwaredevel3-4.html  -
VITTA Victorian Information Technology Teachers Association Inc

This email and any attachments may be confidential. If you are not the intended recipient, you must not disclose 
or use the information in this mail. If received in error, please notify the sender or the College immediately 
and delete the email and all copies. The College does not guarantee that this email is virus or error free. 
Any attached files may only be used on the basis that the user assumes all responsibility for any loss, damage 
or consequence resulting directly or indirectly from the use of the attached files, whether caused by the negligence 
of the sender or not. The content and opinions in this email are not necessarily those of the College.
 



More information about the sofdev mailing list