Created
December 27, 2021 06:59
-
-
Save AlixShahid/d5e11cb45e7edd5fe69a1aa9ef80bce4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| th_pass_mark = 0 | |
| th_max_mark = 0 | |
| pr_pass_mark = 0 | |
| pr_max_mark = 0 | |
| def parmark(pr_max_mark, pr_pass_mark, th_max_mark, th_pass_mark, score_mark): | |
| if score_mark <= th_pass_mark: | |
| score_pr_mark = pr_pass_mark | |
| else: | |
| score_mark_percentage = (100 / th_max_mark) * score_mark | |
| score_pr_mark = (pr_max_mark / 100) * score_mark_percentage | |
| if score_pr_mark < pr_pass_mark: | |
| score_pr_mark = pr_pass_mark | |
| return score_pr_mark | |
| score_mark = float(input("Enter Score Mark: ")) | |
| practical_mark = parmark( | |
| pr_max_mark, pr_pass_mark, th_max_mark, th_pass_mark, score_mark | |
| ) | |
| print(f"Practical Mark: => {practical_mark}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment