Question
Having issues getting the programs output to match how its suppose to look for the assignment. 1- aligning the output 2- adding the test numbers
Having issues getting the programs output to match how its suppose to look for the assignment.
1- aligning the output
2- adding the test numbers
Heres the example on how its suppose to look. Note: Not allowed to use formats.
def main():
scores = []
for i in range(5):
print("Enter test score", i+1)
scores.append(float(input()))
return scores
def determine_grade(num):
if 90
letter_grade = "A"
elif 80
letter_grade = "B"
elif 70
letter_grade = "C"
elif 60
letter_grade = "D"
else:
letter_grade = "F"
return letter_grade
def calc_average(grades):
average = sum(grades) / len(grades)
grade = determine_grade(average)
print("Average: ", average, " ", grade)
scores=[]
name = input("Enter the student name: ")
lst = main()
print("==============================================================")
print(" ====Welcome to Grade and Average test score==== ")
print("==============================================================")
print()
print("--------------------------------------------------------------")
print("Student Name: ", name)
print("--------------------------------------------------------------")
print(" Test \t Numeric Grade \t Letter Grade")
print(" ---- \t ------------- \t ------------")
for n in lst:
print(" ", n, " \t ", determine_grade(n), " ")
print("--------------------------------------------------------------")
calc_average(lst)
Program Calculation The program should determine the letter grade for each score and average score of all five scores, along with the average letter grade. Program Output Shown below is the expected output produced by the program using the sample input: Your output should look like the output above and everything should align correctly You are required to use functions for this assignment. Formatting numbers is covered on pages 68-73 in the textbook. Examples can be found in the Chapter 2 PowerPoint, slide 36Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started