# VARIABLE DEFINITIONS
name=""
adress=""
city=""
state=""
zipcode=""
course1=""
course2=""
course3=""
course4=""
course5=""
#-----------------------------------------------------------------------
# CONSTANT DEFINITIONS
courses= "Enter courses name (Type 'STOP' when finished) :"
pointsR = "\tEnter points received ( Type '9999' when finished) :"
pointsP = "\tEnter points possible for this assignment :"
#-----------------------------------------------------------------------
# FUNCTION DEFINITIONS
#-----------------------------------------------------------------------
# PROGRAM'S MAIN LOGIC
print "GRADE CALCULATOR PROGRAM"
print
name = raw_input("Enter your first and last name:").title()
adress =raw_input("Enter your street adress:").title()
city = raw_input("Enter your city:").title()
state = raw_input("Enter your state abbreviation:").upper()
zipcode= raw_input("Enter your zip code:")
print
course = raw_input(courses).upper()
loopcounter=0
totalPossiblePoints=0
totalPoints=0
while course != "STOP" and loopcounter <5:
loopcounter +=1
pointsReceived= float (raw_input(pointsR))
while pointsReceived != 9999:
pointsReceived+=totalPoints
pointsPossible = float (raw_input(pointsP))
pointsPossible+= totalPossiblePoints
pointsReceived= float(raw_input(pointsR))
course=(course1,course2,course3,course4,course5)
totalPossiblePoints=0
totalPoints=0
if loopcounter < 5:
course= raw_input(courses).upper()
print
print
print name
print adress
print (city), (state) (zipcode)
print
print courses
print overallGpa
Fernando_1
0
Newbie Poster
Recommended Answers
Jump to PostWhat does that mean and what do you want the program to do?
Jump to PostFirst of all you do not need the first 20 lines, it is clearer to use the messages directly in were they are used, global variables/constants are bad idea (with few exceptions to rule). You can find this True when you see what you are doing at line 60 (vs …
All 8 Replies
Fernando_1
0
Newbie Poster
Fernando_1
0
Newbie Poster
Fernando_1
0
Newbie Poster
woooee
814
Nearly a Posting Maven
lancevo3
0
Junior Poster
Fernando_1
0
Newbie Poster
TrustyTony
888
pyMod
Team Colleague
Featured Poster
woooee
814
Nearly a Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.