Introduction: Repetition

The repetition of sequences in technology is a familiar experience for technology users.

  • Remember back to the last time a program or a website required a password that you just couldnt recall. The dialog box accepted your password attempt over and over and when you failed on the fifth try, it closed you out.
  • Picture the little busy icon that cycles through three or four graphics, on and on, until a task is completed.
  • Remember the background music on some website that plays but never ends.

All of these scenarios are the result of program looping strategies called repetition. Repetition provides the power to create programs that can flow in smooth, natural sequences of computer/human interaction.

Initial Post Instructions

Visualize something you do repetitively throughout the day. If you could create a program to do these things for you, what would it look like? Write the pseudocode for the program. Explain why you selected the control and variable names.

Secondary Post Instructions

When responding to your classmates, test their logic and see if you agree with the looping mechanism they selected. If you disagree, please suggest an alternate method and give an example.

Introduction: Differences in Loops

We have studied several types of looping controls. In this discussion, we will work together to identify when each one is the best solution for a particular situation.

Initial Post Instructions

For this discussion, respond to the following questions:

  • Should you use a For loop where you might use a Do ... While loop or a While loop? Does it make a difference when or where you use the different loops?
  • If a loop is to have one performance for each count of a control variable from some minimum value up to some maximum value, what is the preferred type of loop and why?
  • What loop is preferred when there is no knowledge of the number of performances of the loop body before exit from the loop?

Secondary Post Instructions

When responding to your classmates, explain whether or not you agree with their selection for each of the scenarios. If you agree with their selection, please add any additional details you can think of that make that the that best choice. If you disagree, please state which control you would select and justify your decision.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.