Algorithm Inputs and Outputs

Topic

Algorithm Inputs and Outputs

Instructions

This project provides you with the opportunity to examine algorithms, identify the inaccuracies in the algorithms, and finally, to modify the algorithms with the correct details. Your next step will be to write an algorithm that includes the three control structures (sequence, selection, and repetition). First, explain the purpose of the algorithm by providing a brief description for the task being performed. Then, list the details of the algorithm. Remember to include all three control structures (sequence, selection, and repetition).

Select ONE of the following tasks as the basis for completing your algorithm:

  • Changing a television channel by using a remote control
  • Using a sponge to wash a car
  • Walking up a set of stairs

Open the attached Unit I template file for this project. This document include two algorithms you will review, identify the inaccuracies, and insert the corrections. Additionally, there is a space for you to add the algorithm you will write. Complete your work on this template, save the document.

Chapter 2: Exercises 1, 2, & 3

Complete Exercises 1, 2, and 3 in the Exercises section at the end of Chapter 2 on page 31 (see attached). Check your answers for Exercises 1 and 2 by referring to Appendix B (see attached). The answer for Exercise 3 is not in Appendix B, so your grade will be heavily based on how you complete it.

Answer preview

Output:                Tip

Input:                    Total bill

Liquor charge

Tip percentage

Algorithm:

enter total bill, liquor charge, and tip percentage

subtract liquor charge from total bill

multiply the balance with the tip percentage to get the tip

display the tip

Word count: 296