Pass or fail · ผ่านหรือล้มเหลว
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · หน้านี้ต้องใช้เบราว์เซอร์ล่าสุด (รองรับ SharedArrayBuffer) กรุณาอัปเดต Chrome, Edge, Firefox หรือ Safari เป็นเวอร์ชันล่าสุด
This one builds on a lesson you haven't finished yet. Do that lesson first: · อันนี้สร้างจากบทเรียนที่คุณยังไม่เสร็จสิ้น ให้ทำบทเรียนนั้นก่อน:
Python Basics · Making decisions →
English
Pass or fail
mark is 47. Print pass when the mark is 50 or more, and fail otherwise.
else catches everything the if did not. It takes no condition of its own — just else: — and its own indented line underneath.
ไทย
ผ่านหรือล้มเหลว
mark คือ 47. พิมพ์ pass เมื่อคะแนนเป็น 50 ขึ้นไป และ fail ในกรณีอื่น
else จับทุกสิ่งที่ if ไม่ได้จับ มันไม่ต้องการเงื่อนไขของตัวเอง — เพียง else: — และมีบรรทัด indented ของมันเองอยู่ด้านล่าง
mark is 47. Print pass when the mark is 50 or more, and fail otherwise. · mark คือ 47. พิมพ์ pass เมื่อคะแนนเป็น 50 ขึ้นไป และ fail ในกรณีอื่น
Click Run to see the output here. · คลิก Run เพื่อดูผลลัพธ์ที่นี่