Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Biggus Dickus 77
- Biggus Dickus 77
- Biggus Dickus 77
- class Student(object):
- fname = ""
- lname= ""
- idNo = 0
- def __init__(self, firstname, lastname, idnumber):
- self.fname = firstname
- self.lname = lastname
- self.idNo = idnumber
- def make_student(fname, lname, idNo):
- student = Student(fname, lname, idNo)
- return student
- def main():
- maxStudCount = 0
- studentList = []
- studQuery = raw_input("Would you like to add a student? (Type 'Yes' or 'No'): ")
- while studQuery == 'Yes' and maxStudCount < 10:
- fname = raw_input("Enter first name: ")
- lname = raw_input("Enter last name: ")
- idNo = raw_input("Enter ID No: ")
- person = make_student(fname, lname, idNo)
- studentList.append(person)
- maxStudCount = maxStudCount + 1
- studQuery = raw_input("Add another student? ('Yes' or 'No'): ")
- for item in studentList:
- print fname, lname, idNo
- if __name__ =='__main__':
- main()
Add Comment
Please, Sign In to add comment