当前位置:网站首页>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;
}
边栏推荐
- [leetcode]Search for a Range
- 用全连接+softmax对图片的feature进行分类
- 牛客编程题--必刷101之双指针篇
- [leetcode]Search for a Range
- The third season of ape table school is about to launch, opening a new vision for developers under the wave of going to sea
- 数字滚动增加效果
- Derivative, partial derivative, directional derivative
- pgpool-II和pgpoolAdmin的使用
- AWS学习笔记(一)
- STM32项目 -- 选题分享(部分)
猜你喜欢
Compress JS code with terser
Processus général de requête pour PostgreSQL
Have fun | latest progress of "spacecraft program" activities
MySQL --- 常用函数 - 字符串函数
[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files
Wireshark installation
HAVE FUN | “飞船计划”活动最新进展
Cloud Mail .NET Edition
[paper reading | deep reading] graphsage:inductive representation learning on large graphs
你不可不知道的Selenium 8种元素定位方法,简单且实用
随机推荐
服装企业部署MES管理系统的五个原因
CDB PDB user rights management
[unity notes] screen coordinates to ugui coordinates
你不可不知道的Selenium 8种元素定位方法,简单且实用
MySQL
postgresql 之 数据目录内部结构 简介
How to build a 32core raspberry pie cluster from 0 to 1
Processus général de requête pour PostgreSQL
unity中跟随鼠标浮动的面板,并可以自适应文字内容的大小
如何从0到1构建32Core树莓派集群
GEE升级,可以实现一件run tasks
CDB PDB 用户权限管理
基于ensp防火墙双击热备二层网络规划与设计
CSDN 夏令营课程 项目分析
写作系列之contribution
MMDetection3D加载毫米波雷达数据
Halcon实例转OpenCvSharp(C# OpenCV)实现--瓶口缺陷检测(附源码)
牛客编程题--必刷101之双指针篇
Error in fasterxml tostringserializerbase
Why am I warned that the 'CMAKE_ TOOLCHAIN_ FILE' variable is not used by the project?