Guest User

Untitled

a guest
Jul 25th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. # List is stored
  2. list1 = []
  3.  
  4. # Program prompts you to login
  5. username = input("Enter a Usernamen")
  6. password = "password"
  7. password = input("Enter Passwordn")
  8. if (password == "password"):
  9. print("Password Accepted")
  10. print("Welcome - Access Granted")
  11. else:
  12. print("Password Denied")
  13. while(password == "password"):
  14.  
  15. # Program displays a menu
  16. print("GRAFFINS COLLEGE")
  17. print("CAPS DEPARTMENT")
  18. print("[1] Record Marks")
  19. print("[2] Displays Performance List")
  20. print("[3] Display Transcripts")
  21. print("[4] Exit")
  22. print("Please Enter an Option")
  23.  
  24. # Input an option from the menu
  25. option = int(input("Option: "))
  26.  
  27. # For option 1
  28. if option == 1:
  29.  
  30. # Prompt to enter the number of students
  31. # Input number of students
  32. print("Enter the number of students to record")
  33. no_of_students = int(input("Number of students: "))
  34.  
  35. # Initialize count
  36. count = 0
  37.  
  38. # Loop to repeat while count is less than the number entered
  39. while count < no_of_students:
  40.  
  41. # Prompt to enter Student's Admission Number
  42. # Input Admission Number
  43. print("nEnter student's admission number")
  44. adm_number = input("Adm. Number: ")
  45.  
  46. # Prompt to enter Student's Name
  47. # Input Student's name
  48. print("nEnter student's name")
  49. std_name = input("Student's Name: ")
  50.  
  51. # Prompt to enter windows marks
  52. # Input windows marks
  53. print("nEnter Performance in Windows")
  54. windows = int(input("Windows: "))
  55.  
  56. # Prompt to enter word marks
  57. # Input word marks
  58. print("nEnter Performance in Word")
  59. word = int(input("Word: "))
  60.  
  61. # Prompt to enter excel marks
  62. # Input excel marks
  63. print("nEnter Performance in Excel")
  64. excel = int(input("Excel: "))
  65.  
  66. # Prompt to enter access marks
  67. # Input access marks
  68. print("nEnter Performance in Access")
  69. access = int(input("Access: "))
  70.  
  71. # Prompt to enter powerpoint marks
  72. # Input powerpoint marks
  73. print("nEnter Performance in Powerpoint")
  74. powerpoint = int(input("Powerpoint: "))
  75.  
  76. # Prompt to enter internet marks
  77. # Input internet marks
  78. print("nEnter Performance in Internet")
  79. internet = int(input("Internet: "))
  80.  
  81. # The list is defined
  82. list1 = [adm_number, std_name, windows, word, excel, access, powerpoint, internet]
  83.  
  84. # Count increment
  85. count = count + 1
  86.  
  87. # For option 2
  88. elif option == 2:
  89.  
  90. # Command to display the list
  91. print(list1)
  92.  
  93. # Calculation of the total marks
  94. total = windows + word + excel + access + powerpoint + internet
  95.  
  96. # Prompt to display the total marks
  97. print("Total marks: ")
  98. print(total)
  99.  
  100. # Calculation of mean marks
  101. mean = total / 6
  102.  
  103. # Prompt to display mean
  104. print("Mean marks: ")
  105. print(mean)
  106.  
  107. # Condition to check whether students has passed or failed
  108. if mean > 60:
  109. comment = "pass"
  110. else:
  111. comment = "fail"
  112.  
  113. # The comment display prompt
  114. print("Mean grade: ")
  115. print(comment)
  116.  
  117. # For option 3
  118. elif option == 3:
  119.  
  120. # Prompt to enter Student's Admission Number
  121. # Admission Number input
  122. print("Enter admission number of student: ")
  123. adm_number = input("Adm Number: ")
  124.  
  125. # Condition to search for the admission number
  126. for adm_number in list1:
  127. # List is displayed
  128. print("Adm_numbertNametwindowstwordtexceltaccesstpowerpointtinternet")
  129. print(list1)
  130.  
  131. # For option 4
  132. elif option == 4:
  133.  
  134. # Program terminates
  135. break
Add Comment
Please, Sign In to add comment