MikkiCoding
Search…
Welcome!
👩🏫
👩💻 Introduction of Programming
การทำงานของคอมพิวเตอร์เบื้องต้น
การแปลภาษาของโปรแกรม
Flowchart
Preprocesser Directory
Basic Coding
🐍
Python for Beginner
แนะนำภาษา python
ติดตั้งโปรแกรม python ลงบน computer
การพิมพ์คำสั่งขั้นต้น
Data type และการประกาศตัวแปร
Comparison
Condition Statement
Loop Statement
การใช้ break, continue และ pass ใน statement
Function
Data structure
การทำงานร่วมกันกับไฟล์
Exception handling
Document และแหล่งเรียนรู้อื่นๆ
Website
Github
Facebook Page
Twitter
Youtube
Powered By
GitBook
การใช้ break, continue และ pass ใน statement
break
คือ การให้โค้ดของเราหยุดทำงาน เมื่อเข้าสู่ statement ที่เรากำหนด
continue
คือหลังจากเจอ statement ที่เรากำหนด ก็ให้ตรวจที่ statement ถัดไป
pass
ใส่เมื่อเราไม่ให้มีการทำงานใดๆเมื่อเข้า statement ที่เรากำหนด
ตัวอย่าง
1
# check order
2
if
(
order
==
0
):
3
break
4
elsif
(
order
==
1
):
5
continue
6
elif
(
order
%
3
==
0
):
7
pass
8
else
:
9
print
(
order
)
Copied!
Python for Beginner - Previous
Loop Statement
Next - Python for Beginner
Function
Last modified
4mo ago
Copy link
Edit on GitHub