The following algorithm is designed to determine a grade for a course that consists of quizzes, homework, and a final exam:
Step 1: Input course number and name.
Step 2: Input weighting factors for quizzes
Step 3: Input quiz grades and determine an average quiz grade
Step 4: Input homework grades and determine an average homework grade
Step 5: If this course has a final grade, continue to step 6. If not, go to step 9.
Step 6: Input final exam grade
Step 7: Determine average grade AG according to
Step 8: Go to step 10.
Step 9: Determine average grade AG according to
Step 10: Print out course number, name, and average grade.
Step 11: Terminate computation.
(a) Write well-structured pseudocode to implement this algorithm.
(b) Write, debug, and document a structured computer program based on this algorithm. Testitusingthefollowingdatato calculate a grade without the final exam and a grade with the final exam:
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Numerical Methods for Engineers
Additional Math Textbook Solutions
Precalculus: A Unit Circle Approach (3rd Edition)
Calculus: Early Transcendentals (2nd Edition)
Intro Stats, Books a la Carte Edition (5th Edition)
Intermediate Algebra (13th Edition)
Graphical Approach To College Algebra
Elementary Algebra For College Students (10th Edition)
- Ruff, Inc. makes dog food out of chicken and grain. Chicken has 10 grams of protein and 5 grams of fat per ounce, and grain has 2 grams of protein and 2 grams of fat per ounce. A bag of dog food must contain at least 222 grams of protein and at least 162 grams of fat. If chicken costs 11¢ per ounce and grain costs 1¢ per ounce, how many ounces of each should Ruff use in each bag of dog food to minimize cost? (If an answer does not exist, enter DNE.)arrow_forwardSolve the linear system of equations attached using Gaussian elimination (not Gauss-Jordan) and back subsitution. Remember that: A matrix is in row echelon form if Any row that consists only of zeros is at the bottom of the matrix. The first non-zero entry in each other row is 1. This entry is called aleading 1. The leading 1 of each row, after the first row, lies to the right of the leading 1 of the previous row.arrow_forward7. Show that for R sufficiently large, the polynomial P(z) in Example 3, Sec. 5, satisfies the inequality |P(z)| R. Suggestion: Observe that there is a positive number R such that the modulus of each quotient in inequality (9), Sec. 5, is less than |an|/n when |z| > R.arrow_forward
- 9. Establish the identity 1- 1+z+z² + 2n+1 ... +z" = 1- z (z1) and then use it to derive Lagrange's trigonometric identity: 1 1+ cos cos 20 +... + cos no = + 2 sin[(2n+1)0/2] 2 sin(0/2) (0 < 0 < 2л). Suggestion: As for the first identity, write S = 1+z+z² +...+z" and consider the difference S - zS. To derive the second identity, write z = eie in the first one.arrow_forward8. Prove that two nonzero complex numbers z₁ and Z2 have the same moduli if and only if there are complex numbers c₁ and c₂ such that Z₁ = c₁C2 and Z2 = c1c2. Suggestion: Note that (i≤ exp (101+0) exp (01-02) and [see Exercise 2(b)] 2 02 Ꮎ - = = exp(i01) exp(101+0) exp (i 01 - 02 ) = exp(102). i 2 2arrow_forwardnumerical anaarrow_forward
- 2) Consider the matrix M = [1 2 3 4 5 0 2 3 4 5 00345 0 0 0 4 5 0 0 0 0 5 Determine whether the following statements are True or False. A) M is invertible. B) If R5 and Mx = x, then x = 0. C) The last row of M² is [0 0 0 0 25]. D) M can be transformed into the 5 × 5 identity matrix by a sequence of elementary row operations. E) det (M) 120 =arrow_forward3) Find an equation of the plane containing (0,0,0) and perpendicular to the line of intersection of the planes x + y + z = 3 and x y + z = 5. -arrow_forward1) In the xy-plane, what type of conic section is given by the equation - √√√(x − 1)² + (y − 1)² + √√√(x + 1)² + (y + 1)² : - = 3?arrow_forward
- Mathematics For Machine TechnologyAdvanced MathISBN:9781337798310Author:Peterson, John.Publisher:Cengage Learning,Algebra: Structure And Method, Book 1AlgebraISBN:9780395977224Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. ColePublisher:McDougal LittellGlencoe Algebra 1, Student Edition, 9780079039897...AlgebraISBN:9780079039897Author:CarterPublisher:McGraw Hill
- Holt Mcdougal Larson Pre-algebra: Student Edition...AlgebraISBN:9780547587776Author:HOLT MCDOUGALPublisher:HOLT MCDOUGAL