Programming Fundamentals
วันอาทิตย์ที่ 4 ตุลาคม พ.ศ. 2558
Lab 5 - (Function) my_count()
def my_count(word,check):
i = 0
count = 0
while (i<len(word)):
if (word[i] == check):
count = count + 1
i = i + 1
print (count)
my_count("thailand","a")
ไม่มีความคิดเห็น:
แสดงความคิดเห็น
บทความใหม่กว่า
บทความที่เก่ากว่า
หน้าแรก
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น