Access Millions of academic & study documents

IFT 101 Arizona State University Loops Structures Paper

Content type
User Generated
Subject
Computer Science
School
Arizona State University
Type
Worksheet
Showing Page:
1/1
Edwin Vargas, ID: 1218520888
IFT 101 Spring 2020-B
Assignment # 4
1. Name the three types of loops structures. (Sprankle, Chapter 7)
The three type of loop structures are:
A. While/WhileEnd loop
B. Repeat/Until loop
C. Automatic-counter loop
2. State the major differences in the three loop structures:
A. While/WhileEnd Loop: This loop structure would repeat an instruction while the
condition is True. The Loop stops when the condition is false. The condition is
processed before the loop instruction.
B. Repeat/Until Loop: During this loop structure, the instruction is repeated until the
condition is false. The condition is processed after the loop instruction.
C. Automatic-counter Loop: This loop structure is dependent on the increment or
decrement of a counter that either increases or decrease a variable. When a
number is reached, the loop stops.
3. Why would you use an automatic-counter loop over the other two looping structures?
In Using While/WhileEnd loop and Repeat/Until loops, you do not know the exact
number of loop instructions. In an Automatic-counter loop structure, a set number
of loop instructions is assigned. When that number is reached, the loop stops.
4. Explain a recursive procedure.
A recursive procedure is a loop structure where a function calls itself
5. What do you have to do to stop the continued recalling of a recursive procedure?
The loop structure would reach a certain condition given within the same module.

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
Edwin Vargas, ID: 1218520888 IFT 101 – Spring 2020-B Assignment # 4 1. Name the three types of loops structures. (Sprankle, Chapter 7) The three type of loop structures are: A. While/WhileEnd loop B. Repeat/Until loop C. Automatic-counter loop – 2. State the major differences in the three loop ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4