Please code in python3 Ask the user for the number of tests, assignments, exerci
ID: 3763161 • Letter: P
Question
Please code in python3 Ask the user for the number of tests, assignments, exercises, and labs in their course. Ask the user if there is a final with a separate weight from the tests above, e.g. a course could have 2 tests, each weighing 12.5%, and 1 final weighing 15%. For each category having a number > 0 Prompt the user for the weighted percent, out of 100%, which should total 100% for all categories!!! Get the score(s) for the category. If the category is labs, then sum all the scores Else, average the scores. Calculate the weighted average for the category. Using the weighted average of each category, calculate the grade in the course. Ask the user if he/she wants to calculate a grade for another class. If the user responds yes, then go back to step 1. Else, end the program. Requirements, you must have a main function, i.e. def main():, which creates any variables you need for the program and calls other functions using variables created inside of the main function. The only call or variable creation you are allowed to have outside of main (or any other function) is the call to main(), at the very bottom of your program. In addition to your main function, you must define these other functions: get_initial_input() get_scores() calculate_weighted_avg() calculate_class_grade() You can define other functions as you see fit, but at minimum you must have these listed above.Explanation / Answer
Complete Program: