Advertisement
Ridz112

Untitled

Jan 19th, 2021
42
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Student():
  2. name = None
  3. grade = None
  4. tutor = None
  5.  
  6. student1 = Student()
  7. student1.name = "Ridwan"
  8. student1.grade = "B"
  9. student1.tutor = "Bristol"
  10.  
  11. student2 = Student()
  12. student2.name = "Harsh"
  13. student2.grade = "A**"
  14. student2.tutor = "Warwick"
  15.  
  16. student3 = Student()
  17. student3.name = "Hassan"
  18. student3.grade = "H"
  19. student3.tutor = "Warwick"
  20.  
  21. student4 = Student()
  22. student4.name = "Gab"
  23. student4.grade = "Z"
  24. student4.tutor = "Belfast"
  25.  
  26. student5 = Student()
  27. student5.name = "knivedan"
  28. student5.grade = "F"
  29. student5.tutor = "Cardiff"
  30.  
  31. student6 = Student()
  32. student6.name = "Jakaria"
  33. student6.grade = "R"
  34. student6.tutor = "Edinburgh"
  35.  
  36. studentlist = [student1, student2, student3, student4, student5, student6]
  37. pos = 0
  38. while pos < len(studentlist):
  39. print("The Student,", studentlist[pos].name , "Has the grade, ", studentlist[pos].grade ,"And is in the tutor group, ", studentlist[pos].tutor)
  40. print("")
  41. pos += 1
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement