Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore ขั้นตอนการเขียนโปรแกรม1

ขั้นตอนการเขียนโปรแกรม1

Published by sawitreechurak, 2022-01-05 02:22:02

Description: ขั้นตอนการเขียนโปรแกรม1

Search

Read the Text Version

ขนั้ ตอนการเขยี นโปรแกรม การเขยี นโปรแกรม Make Code Programming เป้ าหมาย : เพอื่ เรยี นรพู ้ นื้ ฐานเกยี่ วกบั การใช ้ if_then_else ในบล็อกคำสงั้ Logic ผลการเขยี นโปรแกรม : การใชค้ ำสงั่ if – then – else เพอ่ื เลอื กทำอยา่ งใดอยา่ งหนงึ่ ขนั้ ตอนการเขยี นโปรแกรม Logic Conditionnal_if_then_else ขน้ั ตอนการเขยี นโปรแกรม Logic Conditionnal_if_then_else 1.คลกิ เขา้ ไปท่ี Link : https://makecode.microbit.org เพอ่ื เขา้ หนา้ โปรแกรม microbit คลกิ เลอื ก New Project และตงั้ ชอ่ื โครงการ 2.จะปรากฏดงั ภาพ กดเลอื ก Input เลอื ก on button A

3.คลกิ เลอื ก Variables เลอื ก set to dice 4.คลกิ เลอื ก math เลอื ก pick random

5.คลกิ เลอื ก Logic เลอื ก if then จากนัน้ เลอื ก เครอ่ื งหมาย =

6.คลกิ เลอื ก Variables เลอื ก dice 7.คลกิ เลอื ก Basic เลอื ก show leds และนำมาเรยี งตอ่ กนั เรอ่ื ยๆ

8.คลกิ เลอื ก Input เลอื ก on button B 9.คลกิ เลอื ก Variables เลอื ก set to score

10.คลกิ เลอื ก math เลอื ก pick random 11. คลกิ เลอื ก Logic เลอื ก if then จากนัน้ เลอื ก เครอ่ื งหมาย =

12.คลกิ เลอื ก Variables เลอื ก score 13.คลกิ เลอื ก Basic เลอื ก show string

14. คลกิ เลอื ก Text เลอื ก join 15.ทำตามขอ้ 13 และ 14 ซ้ำแลว้ นำมาเรยี งตอ่ กนั เรอ่ื ยๆจนครบ

16.คลกิ เลอื ก Basic เลอื ก pause (ms) และ clean screen 17.โคด้ ควบคมุ

https://makecode.microbit.org/_cYg6VwdzD01j


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook