IT 210 Week 4 CheckPoint - Iteration Control Structure


IT 210 Entire Course Link


Design a program that models the worm’s behavior in the following scenario:
A worm is moving toward an apple. Each time it moves, the worm
cuts the distance between itself and the apple by its own body
length until the worm is close enough to enter the apple. The worm
can enter the apple when it is within one body length of the apple.

Main Module

Declare Distance to apple as Float

Declare Worm Length as Float

Declare Count As Integer =0

Display “ What is the Distance to the Apple?”

Input Distance to Apple

Display “Worm Length?”
Powered by