Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

This page removed for FERPA compliance
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Midterm Exam 1 Review Fall 2004: Compute the grade

Post your answers, questions, comments, comments on answers, suggestions, suggestions on questions, etc.

Back to Fall2004 Midterm 1 Review



def finalGrade(one,two,three):
average1 = ((one+two)/2).4)
average2 = three.6
final = average1 + average2
if final >= 90:
print 'Congrats, You got an A'
if final >= 80 and final 90:
print 'You got a B'
if finale >= 70 and final 80:
print 'You got a C'
if final >= 60 and final 70:
print 'You got a D'
if final 60:
print 'Better luck next time'


did you try that? it doesn't work

def finalGrade(one,two,three):
average1 = int((one+two)/2).4)
average2 = int((three).6)
final = int(average1 + average2)
for final:
if final >= 90:
print"Congrats, You got an A"
if final >= 80 and final 90:
print"You got a B"
if finale >= 70 and final 80:
print"You got a C"
if final >= 60 and final 70:
print"You got a D"
if final 60:
print"Better luck next time"

Why is the for final: line in there? Also, why mREMOVEDt everything be ints, don't you jREMOVEDt love gettingan 89.4 for a final average? Your program will dissapoint so many students. And thirdly, where does the finale come in for the 70-79 range? I think you've mistyped that. Student1594

def finalGrade(exam1,exam2,exam3):
grade = (exam10.2)+(exam20.2)+(exam30.6)
if grade >= 90.0:
print"Congratulations, you got an A!"
if grade in range(80, 90):
print"You got a B."
if grade in range(70,80):
print"You got a C."
if grade in range(60,70):
print"You got a D."
if grade 60:
print"Better luck next time."

def finalGrade(e1,e2,e3):
grade = (e1&star0.2)+(e2&star0.2)+(e3&star0.6)
if grade >= 90.0:
print"Congratulations, you got an A!"
if grade in range(80, 90):
print"You got a B."
if grade in range(70,80):
print"You got a C."
if grade in range(60,70):
print"You got a D."
if grade 60:
print"Better luck next time."

def finalGrade(exam1,exam2,exam3):
grade = (exam1&star0.2)+(exam2&star0.2)+(exam3&star0.6)
if grade >= 90.0:
print"Congratulations, you got an A!"
if grade in range(80, 90):
print"You got a B."
if grade in range(70,80):
print"You got a C."
if grade in range(60,70):
print"You got a D."
if grade 60:
print"Better luck next time."




def finalGrade(exam1, exam2, exam3):
final=( ( exam1 + exam2 ) / 2
0.4 ) +( exam3: 
0.6)
if final>= 90:
print "congradulation, you got an A!"
if final>=80 and final 90:
print "You got a B."
if final>=70 and final 80:
print "You got a C."
if final>=60 and final 70:
print "You got a D."
if final60:
print "Better luck next time"


def finalGrade(exam1, exam2, exam3):
first = ((exam1 +exam2)/2).4
second = exam3.6
total = first + second
if total >= 90:
print "Congrats, you got an A! "
print "Your grade is: ", total
if total >= 90 and total 90:
print "You got a B. "
print "Your grade is: ", total
if total >= 70 and total 80:
print "You got a C"
print "Your grade is: ", total
if total >= 60 and total 70:
print "You got a D"
print "Your grade is: ", total
if total 60:
print "Better luck next time"
print "Your grade is: ", total

def finalGrade(exam1, exam2, exam3):
first = ((exam1 +exam2)/2).4
second = exam3.6
total = first + second
if total >= 90:
print "Congrats, you got an A! "
print "Your grade is: ", total
if total >= 90 and total 90:
print "You got a B. "
print "Your grade is: ", total
if total >= 70 and total 80:
print "You got a C"
print "Your grade is: ", total
if total >= 60 and total 70:
print "You got a D"
print "Your grade is: ", total
if total 60:
print "Better luck next time"
print "Your grade is: ", total




Link to this Page