• API
• FAQ
• Tools
• Trends
• Archive
daily pastebin goal
69%
SHARE
TWEET

a guest Feb 7th, 2013 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. constant = 1
2. firstrun = True
3. def intro():
4.         print ""
5.         print "this program will tell you what grade you can"
6.         print "get on the final and still keep a certian letter grade."
7.         print ""
8.
9. def inter():
10.         print ""
12.
13. def start():
14.         print ""
15.         print "What grade do you have in the class"
16.
17.         grade = input( ">" ) # Getting the input of the grade
19.
20.         # The if else function here will tell you what score you can get on the final and
21.         # keep an A in the class. If the result is zero,
22.         # then you will get AT LEAST that grade
23.         print "For an A"
25.                 print ( "0" )
27.
28.         print "for a B"
30.                 print ( "0" )
32.
33.         print "for a C"
35.                 print ( "0" )
37.
38.         print "for a D"
40.                 print ( "0" )
42.         print "NOTE- if there is a 0 or a number over 100 displayed on the grade,"
43.         print "that means that you can not get that grade"
44.
45.
46.
47.
48. while constant == 1:
49.         if firstrun == True:
50.                 intro()
51.                 start()
52.                 firstrun = False # sets the variable to false so it will go to the else on the next run
53.                 inter()
54.                 # I was having some trouble with the repeting scrips not asking if you wanted
55.                 # to calculate the grade again and would just give you a promp for it. so I added
56.                 # another function that did ask
57.
58.         else:
59.                 answer = raw_input ( ">" ) # dont forget to add a raw_input, it can be very frusterating when you dont.