title: Weighted Grade book Project
body: <p>Create a program that will calculate a student’s grade in a class that uses a weighted gradebook.</p>
  
  <p>A weighted system uses percentages to determine how much each assignment category is worth. For this project, use the following percentages:</p>
  
  <ul>
  <li>Project Grades = 30% (weight = .30)</li>
  <li>Participation Grades = 20% (weight = .20)</li>
  <li>Quizzes = 10% (weight = .10)</li>
  <li>Exams = 40% (weight = .40)</li>
  </ul>
  
  <p>Grading scale:</p>
  
  <ul>
  <li>A - 90-100</li>
  <li>B - 80-89</li>
  <li>C - 70-79</li>
  <li>D - 60-69</li>
  <li>F - Below 60</li>
  </ul>
  
  <p>Note: You will multiply the average for each of the categories by its weight. The final grade is the sum of the calculated weights.</p>
  
  <p>Can't get the code to the allow the user to enter grades in all 4 categories, because it gets stuck on the first category chosen and the loop just goes on and on without stopping asking for a list of scores. I attempted a loop inside a loop, but it only continued on the first one chosen as well. Need multiple grades entered into all 4 categories which is why I need the program to allow the user to enter grades to the other categories not just the one that is chosen first.</p>
  
  <pre><code>print ("Weighted Grade Calculator ")
  name = input("Enter the Student's Name ")
  number = input("Enter the Student's Number ")
  
  x = input("Enter Assignment type: ")
  c = 'y'
  
  #Loop is in case user wants to calculate another students grade
  while c=='y' or c=='Y':
    if x &gt;= "quiz" or x &gt;= "Quiz":
      input_string = input("Enter a list of scores separated by space ")
  #Read ints separated by spaces
      lst = input_string.split()
      print("Calculating sum of element of input list")
  #convert strings to ints and convert map to list
      lst = list(map(int, lst))
  #Find total and avg
      total = sum(lst)
      avg_1 = total/len(lst)
  
    elif x &gt;= "project" or x &gt;= "Project":
      input_string = input("Enter a list of scores separated by space ")
      lst = input_string.split()
      print("Calculating sum of element of input list")
      lst = list(map(int, lst))
      total = sum(lst)
      avg_2 = total/len(lst)
  
    elif x &gt;= "participation" or x &gt;= "Participation":
      input_string = input("Enter a list of scores separated by space ")
      lst = input_string.split()
      lst = list(map(int, lst))
      total = sum(lst)
      avg_3 = total/len(lst)
  
    elif x &gt;= "exam" or x &gt;= "Exam":
      input_string = input("Enter a list of scores separated by space ")
      lst = input_string.split()
      print("Calculating sum of element of input list")
      lst = list(map(int, lst))
      total = sum(lst)
      avg_4 = total/len(lst)
  
    else:
      print("error, please try again")
  
  
      #Finds percentage earned from each category
      w_quiz = avg_1 * 0.1
      w_project = avg_2 * 0.3
      w_participation = avg_3 * 0.2
      w_exams = avg_4 * 0.4
  
      total = w_project + w_quiz + w_participation + w_exams 
      if(total &gt;= 90 and total &lt;=100):
          grade = 'A'
      elif(total &gt;= 80 and total &lt; 90):
          grade = 'B'
      elif(total &gt;= 70 and total &lt; 80):
          grade = 'C'
      elif(total &gt;= 60 and total &lt; 70):
          grade = 'D'
      elif(total &gt;= 0 and total &lt; 60):
          grade = 'F'
      print ("Student Name: " + str(name))
      print ("Student ID: " + str(number))
      print ("Total Weighted Score: " + str(total) + "%")
      print ("Letter Grade: " + grade)
      c = input("Would you like to calculate another grade? (Y or N): ")
  </code></pre>