Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Now that we have loops and decision making abilities, we can start creating some more advanced programs

Now that we have loops and decision making abilities, we can start creating some more advanced programs

English

Now that we have loops and decision making abilities, we can start creating some more advanced programs. While focusing on loops, but being able to use anything we've learned so far:

  1. Think of a problem that could be solved by using a loop - don't reuse the loan amortization example from the programming demo.
  2. What type of loop would you use to solve the problem (while, for, or do-while)?
  3. Using words (no programming required in this discussion), explain how you would go about solving the problem with a loop, in a series of steps.
  4. Taking what you listed in #3 as requirements, have we learned enough at this point in the class that you could program this yourself, and if not, what do you think you are lacking?

Now that we have loops and decision making abilities, we can start creating some more advanced programs. While focusing on loops, but being able to use anything we've learned so far:

  1. Think of a problem that could be solved by using a loop - don't reuse the loan amortization example from the programming demo.
  2. What type of loop would you use to solve the problem (while, for, or do-while)?
  3. Using words (no programming required in this discussion), explain how you would go about solving the problem with a loop, in a series of steps.
  4. Taking what you listed in #3 as requirements, have we learned enough at this point in the class that you could program this yourself, and if not, what do you think you are lacking?

 

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

DISCUSSION POST:

 

In real life, we can see loops and encounter them. In the age of social media and the internet, I thought of the perfect example for loops. Let's say that your family member signs up for Facebook. Upon accessing the site for the signup option, they are asked to input their age. This is because users who are aged 13 and below are not allowed to use the application. If the user is less than 13, the signup page will terminate their application by flashing a sign saying, "Sorry, you're too young." Another example of a loop would be the view friends list option of the site which shows the profile picture, name, and profile link. One can use the following loop to solve the problem:

 

foreach(var $friend in $user->friends) {

  show_friend($friend);

}

 

In this way, the friends displayed in the profile would be different from each other and not recurring.

 

Of course, before actually making use of loops, one must first identify the problem and identify the possible solutions to the project. After that, the programmer will be able to use a loop to solve a particular problem.

 

After doing this, I realized that I still have a lot to learn in programming.

 

Related Questions