Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Design a program that models the worm's behavior in the following scenario: A worm is moving toward an apple.

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 distancebetween 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 a body length of theapple.Your program should ask the user to input the distance to the apple and the worms length. You may assume that the worm always moves towards the apple and that there are no obstacles. When the worm moves towards the apple you should output a message that the worms has moved and the new distance to the apple. When the worm reaches the apple you should let the user know that also.This is a simple program it can all be done in the MAIN module, no sub modules. It should be one page of pseudo code max.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question