Created
October 19, 2022 21:21
-
-
Save maestroh1git/0d30541e28019ff59cacca6f8d74eb3d to your computer and use it in GitHub Desktop.
This snippet, takes user input to give suggestions based on a range of values
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
""" | |
create an admission program to calculate the aggregate score | |
AND TELL THE STUDENTS, THE FACULTY AND DEPARTMENT, HE OR SHE IS LIKELY TO BE ADMITTED TO | |
CRITERIA | |
DS - name, math_score, english_score, scores | |
0 - 49 -no admission | |
50 - 54 -agriculture DEPARTMENT | |
55 - 60 -botany | |
61 - 70 -psychology and statistics | |
71 - 74 -pharmacy, physiology, pharmacology and nursing | |
75 - 79 -banking and finance, accountancy and insurance | |
80 > medicine and law | |
if else, under conditional statements | |
""" | |
name = input("Enter your name: ") | |
scores = [] | |
num_scores= int(input("Enter the number of subjects you are presenting: ")) | |
sum = 0 | |
count = num_scores | |
while count > 0: | |
if num_scores == 0: | |
print("Computing your academic status...") | |
scores.append(int(input("Enter the score: "))) | |
count-=1 | |
if count == 0: | |
print("Computing your academic status...") | |
else: | |
print("next subject please...") | |
print("For",num_scores,"subject(s)") | |
for score in scores: | |
sum = sum + score | |
average = sum/num_scores | |
print("Your average score is",average) | |
if average>=0 and average<=49: | |
print("I'm sorry "+name+", you are not likely to be admitted. Please try again with higher scores") | |
elif average>=50 and average<=54: | |
print("Congratulations "+name+", you are likely to be admitted into the Department of Agriculture") | |
elif average>=55 and average<=60: | |
print("Congratulations "+name+", you are likely to be admitted into the Department of Botany") | |
elif average>=61 and average<=70: | |
print("Congratulations "+name+", you are likely to be admitted into the Department of Psychology and Statistics") | |
elif average>=71 and average<=74: | |
print("Congratulations "+name+", you are likely to be admitted into the Department of Pharmacy, Physiology, Pharmacology and Nursing") | |
elif average>=75 and average<=79: | |
print("Congratulations "+name+", you are likely to be admitted into the Department of Banking and Finance, Accountancy and Insurance") | |
elif average>=80: | |
print("Congratulations "+name+", you are likely to be admitted into the Department of Medicine and Law") | |
else: | |
print(name+",You dont belong in school") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment