# Given your current grade as the input, write a program to help you determine what score you need to get on a final to get an A (90% or higher) in a class # The syllabus states that the final is worth 40% of the overall # The input is an integer # The output should be a percentage rounded to one decimal place # What we are defining for this code # Current Grade, Current points, points needed to get to 90%, and the grade on the final currentGrade = int(input()) currentPoints = currentGrade * 0.6 # 60% pointsNeeded = 90 - currentPoints #Defines what points we need and will subtract the current points that were entered in #The final is worth 40% of the overall grade # 100%(total) - 40% (Final) = 60% Current Grade gradeOnFinal = pointsNeeded / 40 print(str(round(gradeOnFinal, 3) * 100) + "%") # the str is there because you're concatentating with the string % # In python, the + operator for strings only works when both sides are strings.
To embed this project on your website, copy the following code and paste it into your website's HTML: