I want to make a gpa calculator which first ask users to input their total credits for the semester. I achieved to do so. Then I want to take total subjects as input from user which I am able to do too. But now comes the real problem. I want to take input from user in the following form :- ```

“Maths”:“A”, “Physics”:“B”

```
Then to calculate gpa I want to do the following conversion from respective grade to score
Like S = 10, A = 9, B = 8, C = 7 and use it to calculate their gpa with the eqation
gpa = Total Score { Credit of subject * respective grade score} / Total credit
So if a student has 2 subjects Math and Physics and credit for Math is 4 and he scores S and credit for Physics is 3 and he scores C then gpa will be :-
gpa = 4(credit of Math) * 10(grade score for S) + 3(credit of Physics) * 7(grade score for C) / 7(Total Credits)
```