incorprate an array & swap modules

  1. Select one of the 3 scenarios listed below.

A program to calculate the area of a room in order to purchase cans of paint.

A program to calculate the average number of steps or distance for a runner who is training for a marathon.

A program to ask the user to enter a store's daily sales, calculate the weekly sales, and display the result.

Write a document that explains the following:

Describe the task that the program must perform. What questions would you ask a client to get more details on the requirements of the program?

Describe your algorithm or the required steps that must be taken to perform the task. You should list these step by step and be as detailed and specific as possible. For example, Step 1: Pour water into a pot. Step 2: Put pot on the stove burner. And so on.

Write your pseudocode. For example:

Declare Integer age

Display "What is your age?"

Input age

Display "The age you entered is:"

Display age

And so on.

Create a flowchart to depict the steps that take place in a program. You may use any program, such as Microsoft Visio (Available using Rasmussen OntheHub) or Draw.io (http://www.draw.io/).

2. Based on the scenario you selected in the Module 01 Course Project, you should expand on your documentation by adding If-Then-Else or at least 1 series of conditions to your program. Your documentation of this addition should include the following:

Internal documentation, using block and/or line comments.

You must declare all variables before using them in your pseudo code.

Your pseudo code must illustrate all calculations.

Your flowchart must depict each step in the program.

Your flowchart must use 3 types of symbols: ovals (start and end terminal symbols), parallelograms (input and output symbols), and rectangles (processing symbols).

All symbols must be connected by arrows that represent the flow of the program. The flow must make logical sense.

3. Based on the scenario you selected in the Module 01 Course Project - Overview and the additional statements added in Module 02 Course Project - Project Documentation, you should expand by adding at least 1 module to your program. Download copies of all *.py files to submit along with your Word document.

You should also begin translating your pseudocode to your program using Python in the development environment you created. You need to submit updated documentation of this addition that includes the following:

Internal documentation, using block and/or line comments.

You must declare all variables before using them in your pseudo code. Don't forget that variables are just names. You need to assign values to variables. For example:

Set price = 20

Or

Set dollars = 2.75

Your pseudo code must illustrate all calculations and module(s).

Your updated flowchart must depict each step in the program.

All symbols must be connected by arrows that represent the flow of the program. The flow must make logical sense.

You must download copies of your *.py files to submit along with your Word document.

4. Based on the scenario you selected in the Module 01 Course Project - Overview, the additional statements added in Module 02 Course Project - Project Documentation, and modules you created in Module 03 Course Project, you must now add at least 1 input validation loop to your program. Download copies of all *.py files to submit along with your Word document.

You need to submit updated documentation of this addition that includes the following:

Internal documentation, using block and/or line comments.

You must declare all variables before using them in your pseudo code. Don't forget that variables are just names. You need to assign values to variables. For example:

Set price = 20

Or

Set dollars = 2.75

Your pseudo code must illustrate all calculations and module(s).

Your updated flowchart must depict each step in the program.

All symbols must be connected by arrows that represent the flow of the program. The flow must make logical sense.

Your revised flowchart must illustrate the logic of your input validation loop.

You must download copies of your *.py files to submit along with your Word document.

5: Based on the scenario you selected in the Module 01 Course Project - Overview, the additional statements added in Module 02 Course Project - Project Documentation, and modules you created in Module 03 Course Project, you must now add at least 1 array to your program. Download copies of all *.py files to submit along with your Word document.

You need to submit updated documentation of this addition that includes the following:

Pseudocode that illustrates all calculations and a swap module(s).

Your updated flowchart must depict each step in the program, including the swapping.

All symbols must be connected by arrows that represent the flow of the program. The flow must make logical sense.

Your revised flowchart must illustrate the logic of your input validation loop.

You must download copies of your *.py files to submit along with your Word document.

*A program to calculate the area of a room in order to purchase cans of paint

Questions: What is the length of the room? What is the width of the room?

Step 1: Request Data

1.1: Request length of walls

1.2: Request width of walls

1.3: Request height of walls

Step 2: Calculate Area

2.1: Area = 2h(L+W)

Step 3: Display Area

Pseudocode:

1. Module main()

2. //Local variables

3. Declare Real roomLength

4. Declare Real roomWidth

5. Declare Real roomHeight

6.

7. Call getInput (length, width, height)

8.

9. End Module

10.

11. Module getInput()

12. Display “What is the length of the four walls”

13. Input length

14. Display “What is the width of the four walls”

15. Input width

16. Display “What is the height of the four walls”

17. Input height

18. End Module

19.

20. //Area == edge1 * edge2

21.

22. //Get rooms area

23. Input area

24.

25. //Make sure area is not less than 0

26. While room < 0

27. Display “ERROR: The room cannot be less than 0.”

28. Display “Enter the correct area.”

29. Input area

30. End While

31.

32. Display Area

33.

34. If Area is <= 400 square feet Then

35. Display “One can of paint is needed”

36. Else

37. Display “Two cans of paints are needed”

38. End If

incorprate an array & swap modules 1