Guest User

Untitled

a guest
Oct 17th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. def main():
  2. Numberofstudents=eval(input("How many students will enter grades today? "))
  3. Name=input("What is your frist and last name? ")
  4. numberofgrades=eval(input("How many grades do you want to enter? "))
  5. gradecount=0
  6. studentcount=1
  7. lowestgradelisty=[]
  8. while studentcount<=Numberofstudents:
  9. gradetotal=0
  10. while gradecount<numberofgrades:
  11. gradeforlisty=eval(input("Enter grade please: "))
  12. gradetotal=gradetotal+gradeforlisty
  13. gradecount=gradecount+1
  14. Numberofstudents=Numberofstudents-1
  15. studentcount=studentcount+1
  16. lowestgradelisty.extend(gradeforlisty)
  17. min(lowestgradelisty.extend(gradeforlisty))
  18. Drop=(min(lowestgradelisty.extend(gradeforlisty))), "is your lowest grade. do you want to drop it? Enter as yes or no: "
  19. if (Drop=="yes"):
  20. print(Name, "The new total of your grades is", gradetotal-min(lowestgradelisty.append(gradeforlisty)/gradecount))
  21. elif (Drop=="no"):
  22. print("the averages of the grades enetered is", gradetotal/gradecount)
  23. print(Name, "The average of the grades entered for is", gradetotal/gradecount)
  24. gradecount=0
  25. studentcount=1
Add Comment
Please, Sign In to add comment