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 ขั้นตอนการเขียนโปรแกรม 4

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

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

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

Search

Read the Text Version

ขนั้ ตอนการเขยี นโปรแกรม การเขยี นโปรแกรม Make Code Programming เป้ าหมาย : เพอ่ื ศกึ ษาชดุ คำสง่ั ขอ้ มลู ทเ่ี กบ็ คา่ ความเป็ นจรงิ ผลการเขยี นโปรแกรม : โปรแกรมทำงานแสดงคา่ ความเป็ นจรงิ ขนั้ ตอนการเขยี นโปรแกรม Boolean 1.กดเขา้ ไปที่ Link : https://makecode.microbit.org เพอื่ เขา้ หนา้ โปรแกรม microbit คลกิ เลอื ก New Project และตงั้ ชอ่ื โครงการ 2.จะปรากฏดงั ภาพ ใหค้ ลกิ icon เลอื กExtensions หรอื กดAdvancedเลอื ก Extension

3.คลกิ เลอื ก Basic เลอื ก on start คลกิ เลอื ก Variables เพอื่ ทําการ Add library Variables เขา้ มาในโปรแกรม หลงั จาก นัน้ ตงั้ ชอ่ื วา่ เป็ น PlayerScore ของคำศพั ท์ เลอื ก set to PlayerAScore, PlayerBScore 4.คลกิ เลอื ก lnput เลอื ก เพอ่ื กำหนดตวั แปร A, B, A+B คลกิ เลอื ก Variables เพอ่ื ทําการ Add library Variables เขา้ มาในโปรแกรม หลงั จาก นัน้ ตงั้ ชอื่ วา่ เป็ น CoinA, CoinB ของคำศพั ท์ เลอื ก set to CoinA, CoinB คลกิ เลอื ก Math เลอื ก pick random true or false คลกิ เลอื ก Logic เลอื ก if then คลกิ เลอื ก Basic เลอื ก show string, pause (ms), clean screen คลกิ เลอื ก Text เลอื ก join

5.โคด้ ควบคมุ Motor

https://makecode.microbit.org/_6zvAjD06iFwy


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