Computer Science, asked by ailoniakhil, 6 months ago

Goal of the Project: In Class 5 you learned to create abstractions in your code by declaring functions. You also learned to replace repetitive code with a for-loop. In this project, you will have to practice and apply what you have learned in the class and create the layout of a farm. Story: Richard is a hardworking and dedicated farmer. He is always experimenting with new farming methods and now he wants to grow new crops on his farm. Help Richard set the locations of the plants in rows as shown in the image on the right. Each gray square is the position of a plant.

Answers

Answered by sourasghotekar123
0

Answer:

The Loop For

The for loop is used to repeatedly run a known number of lines of code. Sometimes the computer, not you, is the one who can count, but it is still known. Some instances:

Undetermined amount of times

Asking the user to guess a fixed number between 1 and 100 It's impossible for you to predict how many guesses it will require.

"Search an array at random for the specified value." There is no way for you to predict how many attempts it will take to discover the true value.

This is a fictitious example since you would never only glance through an array in search of a value. Always begin at the front of the array and scan one element at a time.

See more:

https://brainly.in/question/29554235

#SPJ1

Similar questions