Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1 Review the below algorithm that uses sequence, selection, and iteration ( repetition ) to add all the even numbers in a list and

Part 1
Review the below algorithm that uses sequence, selection, and iteration (repetition) to add all the even
numbers in a list and print out the sum. Notice how indentation and curly brackets are used to clarify the
different parts of the algorithm.
This algorithm contains examples of all three types of control structures (sequence, selection, and repetition).
The lines are numbered for convenience. For your portfolio project, you will be answering the following
questions and creating your own pseudocode algorithm and flowchart.
Which line(s) of the algorithm contains a repetition control structure? Remember a control structure can
consist of multiple statements.
Which line(s) of the algorithm contains a selection control structure?
If you run this algorithm on the list of numbers (5,10,-2,-3,7,8,12), what would it print? When tracing
through an algorithm, write down the variables (total and number) and act as if you are the computer
executing each line of code and change the values of the variables as needed.
Suppose you had a list of positive numbers such as 5,10,12,13,6,7,1,3,2,1. And suppose for each of
the numbers in the list you added the number to a running total if it is even and subtracted it if it is odd,
starting the total at 0. What result would you get for this list of numbers?
a. Write a pseudocode algorithm that implements the algorithm you used to calculate this total.
b. Create a flowchart that correlates to your pseudocode algorithm. Feel free to use
draw.io to
create your flowchart.
Part 2
Using the techniques you learned in this course, redesign your Critical Thinking Assignment from Module 2 to
make them more complex. Be sure to create a new flowchart for both. Discuss the changes you made to the
projects and why you made these changes (approximately 1 paragraph each).
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

Relate the requirements to the technical features.

Answered: 1 week ago

Question

=+What is the big message you want them to know?

Answered: 1 week ago

Question

=+What do they (audience members) currently think?

Answered: 1 week ago