Home / Expert Answers / Computer Science / this-is-the-code-please-provide-the-hierarchy-chart-ipo-chart-and-flowchart-def-determine-gra-pa188

(Solved): This is the code, Please provide the hierarchy chart, IPO chart, and flowchart. def determine_gra ...



Write a program that asks the user to enter five test scores. The program should display a
letter grade for each score and th
This is the code, Please provide the hierarchy chart, IPO chart, and flowchart.
def determine_grade(score):
    if score >= 90:
        return 'A'
    elif score >= 80:
        return 'B'
    elif score >= 70:
        return 'C'
    elif score >= 60:
        return 'D'
    else:
        return 'F'


def calc_average(g1, g2, g3, g4, g5):
    return (g1 + g2 + g3 + g4 + g5) / 5.0


def main():
    score1 = int(input("Enter a score: "))
    print("Letter grade is " + determine_grade(score1))
    score2 = int(input("Enter a score: "))
    print("Letter grade is " + determine_grade(score2))
    score3 = int(input("Enter a score: "))
    print("Letter grade is " + determine_grade(score3))
    score4 = int(input("Enter a score: "))
    print("Letter grade is " + determine_grade(score4))
    score5 = int(input("Enter a score: "))
    print("Letter grade is " + determine_grade(score5))

    avg = calc_average(score1, score2, score3, score4, score5)

    print("Average score is " + str(avg))
    print("Average grade is " + determine_grade(avg))


if __name__ == '__main__':
    main()
Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Write the following functions in the program: • calc_average. This function should accept five test scores as arguments and return the average of the scores. • determine_grade. This function should accept a test score as an argument and return a letter grade for the score based on the following grading scale: Letter Grade Score 90-100 80-89 70-79 60-69 Below 60 A B C D F Deliverables: 1. * Draw hierarchy chart (or you can use paper & pencil and scan method) 2. * Draw IPO chart for each function (or you can use paper & pencil and scan method) 3. * Draw flowchart (or you can use paper & pencil and scan method) 4. Write python code


We have an Answer from Expert

View Expert Answer

Expert Answer


Hierarchy diagram: IPO Chart: Input Processing Ouptut score1 score2 score3 score4 score5 Call function, determine_grade(sco
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe