Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GPA Calculator
#2
Entering the number of classes would use input(). However, input returns a string, which you would need to convert to an integer with int(). Then you would start with an empty list of grades, make a range() of the number of classes, and loop through that with a for loop. Each time through the loop, input() the next grade and append it to the list of grades.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
GPA Calculator - by Aldmonjoy - Jan-16-2019, 06:43 PM
RE: GPA Calculator - by ichabod801 - Jan-16-2019, 06:48 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020