0% found this document useful (0 votes)
12 views6 pages

Submitted by

The document is a Python script that collects data about students' academic performance and preferences for university admissions. It evaluates their eligibility based on CGPA, admission test scores, and English proficiency, then assigns them to suitable universities or informs them of ineligibility. The script includes functions for data collection and displaying the results in a merit list format.

Uploaded by

temoorahmed21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views6 pages

Submitted by

The document is a Python script that collects data about students' academic performance and preferences for university admissions. It evaluates their eligibility based on CGPA, admission test scores, and English proficiency, then assigns them to suitable universities or informs them of ineligibility. The script includes functions for data collection and displaying the results in a merit list format.

Uploaded by

temoorahmed21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Submitted To Arsalan Khan

Submitted By: Tamur Ahmed


AU ID: 190573
Submission Date: 12th October, 2022.
CODE
print("\t\tTamur Ahmed\n\t\t190573")
print("-"*60)
print("_"*60)

# Import Numpy
import numpy as np

# User will enter number of students

n = int(input("Enter the number of students "))


print("-"*60)
print("_"*60)

def data_fetch(n):
data = {}
s_r = {}

for i in range(n):
print("taking data for student ", i+1)

l = np.array([])

# and accordingly application will ask


# the user to enter data.
name = input("Please enter Name of the student ")
cgpa = float(input("please Enter your CGPA "))
atm = float(input("ENter Admission test marks "))
ielts = float(input("please Enter your English certificate marks "))
pl = float(input("please Enter your Preferred location (1) USA (2) En
gland"))
p = float(input("please Enter your Priority (1) Rank or (2) location
(3) No priority "))

print("_"*60)

l = np.append(l,cgpa)
l = np.append(l,atm)
l = np.append(l,ielts)
l = np.append(l,pl)
l = np.append(l,p)
data[name] = l
#print(data)

print("_"*60)

# Universities 1-3 accept students


if data[name][0] >=3.7 and data[name][2] >= 8 and data[name][1] >= 90:
if data[name][4] == 1:
s_r[name] = "University of oxford [England]"

if data[name][4] == 2 or data[name][4] == 3:
if data[name][3] ==1:
s_r[name] = "Stanford University USA"
elif data[name][3] ==2:
s_r[name] = "University of oxford. [England]"

# Universities 4-7 accept students


elif data[name][0] >=3.5 and data[name][2] >= 7.5 and data[name][1] >=
85:
if data[name][4] == 1:
s_r[name] = "Harvard University [USA]"

if data[name][4] == 2 or data[name][4] == 3:
if data[name][3] ==1:
s_r[name] = "SHarvard University [USA]"
elif data[name][3] ==2:
s_r[name] = "University College London [England]"

# Universities 8-10 accept students


elif data[name][0] >=3.3 and data[name][2] >= 7.0 and data[name][1] >=
80:
if data[name][4] == 1:
s_r[name] = "Imperial College London [England]"

if data[name][4] == 2 or data[name][4] == 3:
if data[name][3] ==1:
s_r[name] = "Yale University [USA]"
elif data[name][3] ==2:
s_r[name] = "Imperial College London [England]"

# If the student is ineligible for any of the universities,


elif data[name][0] <3.3 or data[name][2] < 7.0 or data[name][1] < 80:
s_r[name] = "You are not eligible for any of the mentioned\n\t\t\t\t
universities at ourportal. please use the \n\t\t\t\tfollowing link to sea
rch for \n\t\t\t\tsuitable universitieshttps://www.mastersportal.com/"

#print(s_r)
return s_r

data_r = data_fetch(n)

# Diplay result evaluate the data and place students in universities


def display(merit_list):
print(merit_list)
print("\n\n\n")
print("_"*60)
print("\t\t\tMERIT LIST")
print("_"*60)
print("-"*60)
print("_"*60)
print("Sr No.\t\t Name \t\t\t Result")
print("_"*60)
i = 1
for key in merit_list.keys():
print("{}\t\t{}\t\t{}".format(i,key, merit_list[key]))
i = i+1
print("_"*60)

display(data_r)
# 0 1 2 3 4
# cgpa ad. test ielts loc. prefre
OUTPUT

You might also like