Learning Objective 1.1.A: Represent patterns and algorithms found in everyday life using written language or diagrams.
- 1.1.A.1 Algorithms define step-by-step processes to follow when completing a task or solving a problem. These algorithms can be represented using written language or diagrams.
- 1.1.A.2 Sequencing defines an order for when steps in a process are completed. Steps in a process are completed one at a time.
Learning Objective 1.1.B: Explain the code compilation and execution process.
- 1.1.B.1 Code can be written in any text editor; however, an integrated development environment (IDE) is often used to write programs because it provides tools for a programmer to write, compile, and run code.
- 1.1.B.2 A compiler checks code for some errors. Errors detectable by the compiler need to be fixed before the program can be run.
Learning Objective 1.1.C: Identify types of programming errors.
- 1.1.C.1 A syntax error is a mistake in the program where the rules of the programming language are not followed. These errors are detected by the compiler.
- 1.1.C.2 A logic error is a mistake in the algorithm or program that causes it to behave incorrectly or unexpectedly. These errors are detected by testing the program with specific data to see if it produces the expected outcome.
- 1.1.C.3 A run-time error is a mistake in the program that occurs during the execution of a program. Run-time errors typically cause the program to terminate abnormally.
- 1.1.C.4 An exception is a type of run-time error that occurs as a result of an unexpected error that was not detected by the compiler. It interrupts the normal flow of the program's execution.
จุดประสงค์การเรียนรู้ 1.1.A: แสดงรูปแบบและอัลกอริทึมที่พบในชีวิตประจำวันโดยใช้ภาษาเขียนหรือแผนภาพ
- 1.1.A.1 อัลกอริทึม กำหนดขั้นตอนทีละขั้นตอนที่ต้องปฏิบัติตามเมื่อทำงานหรือแก้ปัญหา อัลกอริทึมเหล่านี้สามารถแสดงได้ด้วยภาษาเขียนหรือแผนภาพ
- 1.1.A.2 การเรียงลำดับ กำหนดลำดับสำหรับการดำเนินการขั้นตอนต่าง ๆ ในกระบวนการ ขั้นตอนในกระบวนการจะดำเนินการทีละขั้นตอน
จุดประสงค์การเรียนรู้ 1.1.B: อธิบายกระบวนการคอมไพล์และรันโค้ด
- 1.1.B.1 โค้ดสามารถเขียนได้ในโปรแกรมแก้ไขข้อความใดก็ได้ แต่มักใช้ สภาพแวดล้อมการพัฒนาแบบบูรณาการ (IDE) ในการเขียนโปรแกรม เพราะมันมอบเครื่องมือให้ผู้พัฒนาโค้ดสามารถเขียน คอมไพล์ และรันโค้ดได้
- 1.1.B.2 คอมไพเลอร์ ตรวจสอบโค้ดหาข้อผิดพลาดบางประเภท ข้อผิดพลาดที่คอมไพเลอร์ตรวจจับได้ต้องได้รับการแก้ไขก่อนที่โปรแกรมจะถูกรันได้
จุดประสงค์การเรียนรู้ 1.1.C: ระบุประเภทของข้อผิดพลาดในการเขียนโปรแกรม
- 1.1.C.1 ข้อผิดพลาดทางไวยากรณ์ (syntax error) คือความผิดพลาดในโปรแกรมที่ไม่ปฏิบัติตามกฎของภาษาการเขียนโปรแกรม ข้อผิดพลาดเหล่านี้ถูกตรวจจับโดยคอมไพเลอร์
- 1.1.C.2 ข้อผิดพลาดทางตรรกะ (logic error) คือความผิดพลาดในอัลกอริทึมหรือโปรแกรมที่ทำให้มันทำงานผิดหรือผิดปกติไปจากที่คาด ข้อผิดพลาดเหล่านี้ถูกตรวจจับด้วยการทดสอบโปรแกรมด้วยข้อมูลเฉพาะเพื่อดูว่ามันให้ผลลัพธ์ตามที่คาดหวังหรือไม่
- 1.1.C.3 ข้อผิดพลาดขณะรัน (run-time error) คือความผิดพลาดในโปรแกรมที่เกิดขึ้นระหว่างการรันโปรแกรม ข้อผิดพลาดขณะรันมักทำให้โปรแกรมหยุดทำงานอย่างไม่ปกติ
- 1.1.C.4 ข้อยกเว้น (exception) เป็นประเภทหนึ่งของข้อผิดพลาดขณะรันที่เกิดขึ้นเป็นผลจากความผิดพลาดที่ไม่คาดคิดซึ่งไม่ถูกตรวจจับโดยคอมไพเลอร์ มันขัดขวางการไหลตามปกติของการรันโปรแกรม






