วันอังคารที่ 22 กันยายน พ.ศ. 2558

Lab05 : Find/count number of positive values in array

def setup():
    a = [11,20,14,13,5,-80,50,0]
    printpos(a)
 
def printpos(a):
    i=0
    count=0
    while i<len(a):
        if a[i]>=0:
            print(a[i],end =' ')
            count+=1
        i+=1
    print("Count :",count) 
setup()

ไม่มีความคิดเห็น:

แสดงความคิดเห็น

commit เพิ่มเติม : เพื่ม userstory, bookmark

>>  add userstory ทำการเพิ่ม userstory ใน functional tests >>  add bookmark for user เพิ่มระบบ Bookmark โดยการสร้าง model ขึ...