we learn about low-level programming languages and pseudocode. It is important to understand the purpose of algorithms
Question:
we learn about low-level programming languages and pseudocode. It is important to understand the purpose of algorithms and how to write algorithms using pseudocode as a preliminary step to writing programs in a programming language. In addition to writing algorithms in pseudocode, an important next step is testing the algorithms for correctness. You will show your knowledge of the topics by answering the following questions.
1. Explain how assembly language can be more beneficial than machine language for the programmer?
2. Describe the foundational role of algorithms as it relates to computing and the purpose of using pseudocode to write algorithms. Include the role of variables in pseudocode and how assignments are used in conjunction with variables in your description.
3. Create the following variables that can be used to store values. Use the naming conventions as outlined in the Algorithms/Pseudocode Guidelines document in the course resources section of the course.
1. test grade for student test
2. total of all test grades added together
3. the average for the test grades
4. Create an assignment statement that sets the value of the variable you created to store the value of all test grades added together to zero. You may refer to Table 6.1 in Chapter 6 for examples.
5. Create an input statement to input the value for the first test grade for the variable you created.
6. Create an algorithm that will obtain the test grade for three students, add the test grades together, calculate the average of the test grades, and output the average. Use a count-controlled loop to create the algorithm. Use the information from your answers to questions 3, 4, and 5 in the creation of your algorithm. Also use information and examples from Chapter 6 and Chapter 7 to help you create the algorithm.
7. Create the test to check the algorithm that is in a format similar to the following.
Reason for Test Case | Input values | Expected Output | Observed Output |
Assumption: Input values are between 0 and 100. | |||
Input three values greater than 0. | |||
Input three values with one being a grade of 0. | |||
Input three values with one being a grade of 100 |
Chapter 7
In Chapter 7 we continue learning about algorithms with a focus on solving problems. The purpose of writing algorithms is to solve problems. While there are many ways to write an algorithm to correctly solve a problem, some structures are more efficient than others. We take a look at different structures used in writing algorithm and the strategies utilized. You will show your knowledge of the topics by answering the following questions.
8. Explain why an algorithm with a repetition control structure with a count-controlled loop is a better choice than a repetition with an event-controlled loop for the algorithm you created in question 6.
9. Explain how a sequential search algorithm works as compared to a binary search algorithm.
Systems analysis and design in a changing world
ISBN: 978-1423902287
5th edition
Authors: John W. Satzinger, Robert B. Jackson, Stephen D. Burd