Please answer the following question with python file Thank
Please answer the following question with python file. Thank you.
Homework 1 Files to submit: grade need.py Time it took Matthew to Complete: 5 mins .Submit only the files requested o Do NOT submit folders or compressed files such as .zip, .rar, .tar, targz, etc Your program must match the output exactly to receive credit. o Make sure that all prompts and output match mine exactly. o Easiest way to do this is to copy and paste them All input will be valid unless stated otherwise Print all real numbers to two decimal places unless otherwise stated The examples provided in the prompts do not represent all possible input you can receive. All inputs in the examples in the prompt are underlined o You don\'t have to make anything underlined it is just there to help you differentiate between what you are supposed to print and what is being given to your progranm If you have questions please post them on Piazza Problemm For this problem vou will be figuring out what grade you need to get on the final in order to get the grade that you want in the class. Examples 1. Enter the grade you want in the class: B Enter the percent you need in the class to get that grade: 80 Enter the percent you currently have in the class: 75 Enter the weight of the final: 20 You need to score at least 100.00% on the final to get a B in the class 2. Enter the grade you want in the class: A Enter the percent you need in the class to get that grade: 90 Enter the percent you currently have in the class: 13 Enter the weight of the final: 30 You need to score at least 129.67% on the final to get a A in the class 3. Enter the grade you want in the class: A Enter the percent you need in the class to get that grade: 90 Enter the percent you currently have in the class: 84 Enter the weight of the final 30 You need to score at least 104.00% on the final to get a A in the classSolution
The code to find the Final grade required calculation using python is below:
string = raw_input(\'Enter the grade you want in the class : \')
 string1 = int(raw_input(\'Enter the percent you need in the class to get the grade : \'))
 string2 = int(raw_input(\'Enter the percent you currently have in the class : \'))
 string3 = int(raw_input(\'Enter the weight of the final : \'))
 r_per = ((100*string1)-((100-string3)*(string2))/string3
 print \"the percent required to achieve the desired grade is\", r_per

