Author: Not specified Language: python
Description: Not specified Timestamp: 2017-09-20 16:25:32 +0000
View raw paste Reply
  1. ects_earned = 138
  2. points_earned = 44
  3. points_max = 60
  4. ects_required_for_ba = 180
  5.  
  6. # ECTS missing are 180 - 138 = 42
  7. ects_missing = 42
  8.  
  9. # Nr of 6 ECTS courses student has to take in order to complete BA.  42 / 6 = 7
  10. # Problem , the variable name mustn't start with a number, as the interpreter cannot deal with this.
  11. six_ects_courses = 7
  12.  
  13. # Formula for calculation :
  14. # (points_earned / points_max) * 5 + 1
  15. grade = 4.66
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24. print("So far you earned ", ects_earned, " ECTS points.")
  25. print("In that exam you got ", points_earned, " of ", points_max, " points.")
  26.  
  27.  
  28. print("You are missing ", ects_missing, " of ", ects_required_for_ba, " in order to complete your BA.")
  29. print("You have to still take ", six_ects_courses, " to receive enough ECTS points for BA completion.")
  30. print("In this test you achieved a grade of: ", grade)
  31.  
View raw paste Reply