当前位置:网站首页>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;
}
边栏推荐
- A new path for enterprise mid Platform Construction -- low code platform
- Argo workflows source code analysis
- postgresql之整体查询大致过程
- [unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files
- Use of pgpool II and pgpooladmin
- [C # notes] use file stream to copy files
- Web3对法律的需求
- Go swagger use
- pgpool-II和pgpoolAdmin的使用
- Detailed explanation of line segment tree (including tested code implementation)
猜你喜欢
fiddler的使用
6-6 vulnerability exploitation SSH security defense
Douban average 9 x. Five God books in the distributed field!
Web3's need for law
[paper reading | deep reading] rolne: improving the quality of network embedding with structural role proximity
导数、偏导数、方向导数
MMDetection3D加载毫米波雷达数据
3 -- Xintang nuc980 kernel supports JFFS2, JFFS2 file system production, kernel mount JFFS2, uboot network port settings, and uboot supports TFTP
一文读懂Faster RCNN
你不可不知道的Selenium 8种元素定位方法,简单且实用
随机推荐
leetcode:736. LISP syntax parsing [flowery + stack + status enumaotu + slots]
[node learning notes] the chokidar module realizes file monitoring
写作系列之contribution
NuScenes数据集关于Radar数据的统计
AWS学习笔记(一)
[leetcode]Search for a Range
数论 --- 快速幂、快速幂求逆元
Error in fasterxml tostringserializerbase
[paper reading | deep reading] graphsage:inductive representation learning on large graphs
This week's hot open source project!
慧通编程入门课程 - 2A闯关
Lumion 11.0 software installation package download and installation tutorial
How do I dump SoapClient requests for debugging- How to dump SoapClient request for debug?
[leetcode]Search for a Range
本周 火火火火 的开源项目!
哈希表及完整注释
Wireshark installation
postgresql之整體查詢大致過程
Unity custom webgl packaging template
Leetcode:minimum_ depth_ of_ binary_ Tree solutions