Python Programming/
รุ่นแก้ไขเมื่อ 02:07, 7 ธันวาคม 2554 โดย 202.29.65.202 (คุย) (หน้าที่ถูกสร้างด้วย 'total = 0 grade_counter = 0 grade = input("Enter your grade(type -1 to stop) : ") while grade != -1: grade = input("Enter next grade(…')
total = 0 grade_counter = 0 grade = input("Enter your grade(type -1 to stop) : ")
while grade != -1:
grade = input("Enter next grade(type -1 to stop) : ") total = total + grade grade_counter += 1
class_average = float(total)/grade_counter print "The aberage are ", class_average, "from", grade_counter, "input"
else:
print "\nNo grade"