Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This course has many different types of assignments, all of which are weighted differently. Using the syllabus as a guide, do the following: Design the

This course has many different types of assignments, all of which are weighted differently. Using the syllabus as a guide, do the following:
Design the function final_percentage, which will compute a student's final percentage given the unweighted percentages from each category listed in the syllabus. Inputs must follow the same order as given in the syllabus and will all be decimal numbers in the range of 0.0 to 1.0. If your algorithm receives a value outside that range, it should "clamp" the number to the nearest bound. For example, clamping the values (-5,1.1,0.8) would produce the result (0.0,1.0,0.8). Hint: It might be beneficial to divide this problem and design another algorithm as a helper. Make sure to test!
After calculating the weighted percentage, you should display this value as a native percentage in the range (0.0,100.0) with an attached percent symbol (%). For example, the value (0.5) displays as "50.0%" and not "50.0%". If you get stuck here, look into your notes on how we've shown how to display data. Your algorithm should return the calculated weighted percentage as a decimal with the same bounds as the inputs.
In addition to the tests that you write, you can use the following examples to build confidence in your code:

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

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions

Question

What is cost plus pricing ?

Answered: 1 week ago

Question

1. What are the types of wastes that reach water bodies ?

Answered: 1 week ago

Question

Which type of soil has more ability to absorb water?

Answered: 1 week ago