4.1 Write a program for each of the following:
(a) Listing all students whose CUM is K or higher. (Test the program using K = 3.00.)
(b) Listing all students in year L. (Test the program using L= 2, or sophomore.
k=2.0
S=int(input("Enter student's CUM: "))
year=int(input("Enter the student's year of study: "))
count=0
if S==k or S>k:
print("Student has CUM greater or equal to ", k)
if year==2:
print("Student is in year 2")
Comments
Leave a comment