please show all steps. thank you Write a program that calculates the homework as
ID: 3607701 • Letter: P
Question
please show all steps. thank you
Write a program that calculates the homework assignment grade points (a 100 points scale) according to the rule posted for this class (a simplified version): Rule #1 : The score calculation is based on: 1. all problems are attempted (40 percent) before the due date, and 2, 75% or more are correct (40 percent proportionally to the attempted ones), and ing Projects" are submitted with a program that produces correct result in Netbeans REGARDLESS the verdict from MyProgrammingL.ab system (20 percent) You may try to do the problems multiple times if you cannot get them right first time and you may go back to correct (and re-submit) wrong problems even after due date with no penalties. Rule #2: Assignment submitted after the scheduled due date will drop 1/2 of points program should prompt use to input the following data and calculate and output the result for each student: The Prompt for data: 1 Number of problems attempted on or before due date 2. Number of correct problems among (1) above 3. Number of problems attempted after due date 4. Number of correct problems among (3) above Number of un-attempted problems 6. Number of "Programming Projects" submitted 7. Number of "Programming Projects" not submitted 5.Explanation / Answer
Python Code :
Total_problems=20
Total_project=10
print("1.Number of problems attempted on or before due date")
prb_attempted=int(input())
print("2.Number of correct problems")
crct_problem=int(input())
print("3.Number of problems attempted after due date")
no_prblm_aft_due=int(input())
print("4.Number of correct problems among attempted problem after due date")
crct_problem_aft_due=int(input())
print("5.Number of un-attempted problems")
unattempted_problem=int(input())
print("6.Number of "Programming Projects" submited")
prg_proj_submitted=int(input())
print("7.Number of "Programming Projects" not submited")
prg_proj_not_sum=int(input())
mar_for_attempted_problem = ( prb_attempted * (40/Total_problems))
#print("mar_for_attempted_problem ",mar_for_attempted_problem)
if no_prblm_aft_due > 0:
crctproblem_percent=((crct_problem+crct_problem_aft_due)/(prb_attempted+no_prblm_aft_due))*100
#print("crctproblem_percent ",crctproblem_percent)
else:
crctproblem_percent=(crct_problem/prb_attempted)*100
#print("crctproblem_percent ",crctproblem_percent)
if crctproblem_percent >= 75:
mar_for_attempted_problem += (prb_attempted+no_prblm_aft_due)*(40/Total_problems)
#print("mar_for_attempted_problem ",mar_for_attempted_problem)
if prg_proj_submitted >0:
prg_proj_marks=prg_proj_submitted * 2
#print("project mark ",prg_proj_marks)
mark = mar_for_attempted_problem + prg_proj_marks
deduction= (Total_problems-(crct_problem +crct_problem_aft_due))+ (Total_project- prg_proj_not_sum)
Final_mark=mark - (deduction *0.5)
print(" Total Marks is :",mark)
Output:
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.