def obtainListOfStudents():
    listOfStudents = []
    carryOn = 'Y'
    while carryOn == 'Y':
        name = input("Enter student's name: ")
        id = input("Enter ID: ")  # Asking for ID
        midterm = float(input("Enter student's grade on midterm exam: "))
        final = float(input("Enter student's grade on final exam: "))
        category = input("Enter category (LG, PF or IN): ")

        if category.upper() == "LG":
            inOutState = input("Is the student in-state?<Y/N> "
                               )  # Askes for state status of student
            st = studentWithStatus.LGstudent(name.title(), midterm, final, id,
                                             inOutState)
        elif category.upper() == "PF":
            fullTime = input("Is the student full time? (Y/N)")
            st = studentWithStatus.PFstudent(name.title(), midterm, final, id,
                                             fullTime)
        else:
            fullTime = input("Is the student full time? (Y/N)")
            st = studentWithStatus.InternshipStudent(name.title(), midterm,
                                                     final, id, fullTime)

        listOfStudents.append(st)
        carryOn = input("\nDo you want to continue (Y/N)? ")
        carryOn = carryOn.upper()
    return listOfStudents
Exemple #2
0
def obtainListOfStudents():
    listOfStudents = []
    carryOn = 'Y'
    while carryOn == 'Y':
        name = "alex"
        midterm = 100
        final = 100
        id = "123"
        category = "PF"

        ##
        if category.upper() == "LG":
            inOutState = "N"  ###
            st = studentWithStatus.LGstudent(name, midterm, final, id,
                                             inOutState)
        else:
            status = input("Is the student full time? (Y/N)")
            fullTime = False
            if status.upper() == 'Y':
                fullTime = True
            st = studentWithStatus.PFstudent(name, midterm, final, id,
                                             fullTime)

        listOfStudents.append(st)
        carryOn = "n"  ##
        carryOn = carryOn.upper()
    return listOfStudents
Exemple #3
0
def main():
    name = input("Enter student's name: ")
    midterm = float(input("Enter student's grade on midterm exam: "))
    final = float(input("Enter student's grade on final exam: "))
    category = input("Enter category (LG or PF): ")
    if category.upper() == "LG":
        st = studentWithStatus.LGstudent(name, midterm, final)
    else:
        question = input("Is " + name + " a full-time student (Y/N)? ")
        if question.upper() == 'Y':
            fullTime = True
        else:
            fullTime = False
        st = studentWithStatus.PFstudent(name, midterm, final, fullTime)
    semesterGrade = st.calcSemGrade()
    print("\nNAME\tGRADE\tSTATUS")
    print(st)
Exemple #4
0
def main():
    ## Calculate and display a student's semester letter grade and status.
    # Obtain student's name, grade on midterm exam, and grade on final.
    name = input("Enter student's name: ")
    midterm = float(input("Enter student's grade on midterm exam: "))
    final = float(input("Enter student's grade on final exam: "))
    category = input("Enter category (LG or PF): ")
    if category.upper() == "LG":
        st = studentWithStatus.LGstudent(name, midterm, final)
    else:
        question = input("Is " + name + " a full time student (Y/N)? ")
        if question.upper() == 'Y':
            fullTime = True
        else:
            fullTime = False
        st = studentWithStatus.PFstudent(name, midterm, final, fullTime)
    # Display student's name, semester letter grade, and status.
    semesterGrade = st.calcSemGrade()
    print("\nNAME\tGRADE\tSTATUS")
    print(st)
Exemple #5
0
def obtainListOfStudents():
    listOfStudents = []
    carryOn = 'Y'
    while carryOn == 'Y':
        name = input("Enter student's name: ")
        midterm = float(input("Enter student's grade on midterm exam: "))
        final = float(input("Enter student's grade on final exam: "))
        category = input("Enter category (LG or PF): ")
        if category.upper() == "LG":
            st = studentWithStatus.LGstudent(name, midterm, final)
        else:
            status = input("Is the student full time? (Y/N)")
            fullTime=False
            if status.upper() == 'Y':
                fullTime=True
            st = studentWithStatus.PFstudent(name, midterm, final, fullTime)

        listOfStudents.append(st)
        carryOn = input("Do you want to continue (Y/N)? ")
        carryOn = carryOn.upper()
    return listOfStudents