Hi,
Can someone help me with this assignment, I am confused of what is needed to be done here.
I am suposed to design a program that models a 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 lenght until the worm is close enough to enter the apple. The worm can enter the apple when it is within a body lenth of the apple.
I was told I can make up my own length for the worm and distantand what ever I need to make this design.
So can someone give me some example of what I can do for this scenario that deals with a Repetition structure design?
Thank you
Can someone help me with this assignment, I am confused of what is needed to be done here.
I am suposed to design a program that models a 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 lenght until the worm is close enough to enter the apple. The worm can enter the apple when it is within a body lenth of the apple.
I was told I can make up my own length for the worm and distantand what ever I need to make this design.
So can someone give me some example of what I can do for this scenario that deals with a Repetition structure design?
Thank you
Comment