当前位置:网站首页>Huitong programming introductory course - 2A breakthrough
Huitong programming introductory course - 2A breakthrough
2022-07-07 02:39:00 【Middle school student Xinjing】
The content after the double slash in the following code is teacher Liu's comment , No need for students to input
Forward 100
int main() {
//pen: paint brush
//fd: Forward
//pen.fd(100): Brush forward 100 Step
pen.fd(100);
return 0;
}
Lateral advance 100
int main() {
//rt: Turn right
//pen.rt(90): Turn the brush right 90 degree
pen.rt(90);
pen.fd(100);
return 0;
}
draw 7 word
int main() {
pen.fd(200);
//lt: Turn left
//pen.lt(90): Brush left 90 degree
pen.lt(90);
pen.fd(100);
return 0;
}
draw U shape
int main() {
pen.fd(200);
//pen.rt(90).fd(150): Turn the brush right 90 degree , Forward 150 Step
pen.rt(90).fd(150);
//hide: hide
//pen.rt(90).fd(200).hide(); Turn the brush right 90 degree , Forward 200 Step , hide
pen.rt(90).fd(200).hide();
return 0;
}
draw T shape
int main() {
pen.fd(200).rt(90);
//bk: back off
//pen.fd(100).bk(200): Brush forward 100, back off 200
pen.fd(100).bk(200);
pen.hide();
return 0;
}
Draw a cross
int main() {
//pen.fd(100).bk(200): Brush forward 100 Step , back off 200 Step
pen.fd(100).bk(200);
//pen.fd(100).rt(90): Brush forward 100 Step , Turn right 90 degree
pen.fd(100).rt(90);
pen.fd(100).bk(200);
return 0;
}
边栏推荐
猜你喜欢
What are the applications and benefits of MES management system
[paper reading | deep reading] dngr:deep neural networks for learning graph representations
How to build a 32core raspberry pie cluster from 0 to 1
Pioneer of Web3: virtual human
1--新唐nuc980 NUC980移植 UBOOT,从外部mx25l启动
B站6月榜单丨飞瓜数据UP主成长排行榜(哔哩哔哩平台)发布!
电气工程及其自动化
leetcode:5. Longest palindrome substring [DP + holding the tail of timeout]
实施MES管理系统时,哪些管理点是需要注意的
Draco - gltf model compression tool
随机推荐
Real project, realized by wechat applet opening code (end)
普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
Application analysis of face recognition
实施MES管理系统时,哪些管理点是需要注意的
Argo workflows source code analysis
fiddler的使用
Ali yunyili: how does yunyuansheng solve the problem of reducing costs and improving efficiency?
AWS learning notes (I)
Five reasons for clothing enterprises to deploy MES management system
widerperson数据集转化为YOLO格式
QT常见概念-1
数字滚动增加效果
Here comes a white paper to uncover the technology behind Clickhouse, a node with 10000 bytes!
Rethinking of investment
KYSL 海康摄像头 8247 h9 isapi测试
数论 --- 快速幂、快速幂求逆元
记一次JAP查询导致OOM的问题分析
进程管理基础
CDB PDB 用户权限管理
How to build a 32core raspberry pie cluster from 0 to 1