Discussion 2

profileAdejoke
DiscussionReply2.docx

In your responses to your classmates, address the following:

· Evaluate the functions your classmates have listed and suggest ways to incorporate more or combine methods together.

· Remember, you are required to respond to at least two of your classmates' posts.

· Please use the instructions to comment or work on the below post.

I have chosen to talk about the iteration models. In the while () loop iteration supplied, it has the user enter grades for different assignments and adds them together, while each time a grade is entered, increases the count of how many were entered. Since finding the average of a set of numbers is simply the sum divided by the count, it does just that when an invalid number is (set by grade>0) is typed in, then displays the average on screen.

· Text  Description automatically generated

· For my own example, I used a do while loop that includes an if statement. The program is simply a pin access with limited attempts. It requests the user input a preset pin and only allows 3 attempts before locking you out.

·

image1.png

image2.png