Computer Fundamental
5801012630092 Thanyanan Aiamsamang
วันอาทิตย์ที่ 25 ตุลาคม พ.ศ. 2558
Lab 5 : Find average of values in array
def setup():
n = [ 1, 8, 7, 12, 3, 6, 9 ]
i = 0
sum = 0
while(i < len(n)):
sum = sum + n[ i ]
i = i + 1
aver = sum/len(n)
print("average =", aver)
setup()
ไม่มีความคิดเห็น:
แสดงความคิดเห็น
บทความใหม่กว่า
บทความที่เก่ากว่า
หน้าแรก
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น