当前位置:网站首页>慧通编程入门课程 - 2A闯关
慧通编程入门课程 - 2A闯关
2022-07-06 18:51:00 【中学生信竞】
以下代码中双斜杠后面的内容是刘老师的注释,不需要同学们输入
前进100
int main() {
//pen:画笔
//fd:前进
//pen.fd(100):画笔前进100步
pen.fd(100);
return 0;
}
横向前进100
int main() {
//rt:右转
//pen.rt(90):画笔右转90度
pen.rt(90);
pen.fd(100);
return 0;
}
画7字
int main() {
pen.fd(200);
//lt:左转
//pen.lt(90):画笔左转90度
pen.lt(90);
pen.fd(100);
return 0;
}
画U形
int main() {
pen.fd(200);
//pen.rt(90).fd(150):画笔右转90度,前进150步
pen.rt(90).fd(150);
//hide:隐藏
//pen.rt(90).fd(200).hide(); 画笔右转90度,前进200步,隐藏
pen.rt(90).fd(200).hide();
return 0;
}
画T形
int main() {
pen.fd(200).rt(90);
//bk:后退
//pen.fd(100).bk(200):画笔前进100,后退200
pen.fd(100).bk(200);
pen.hide();
return 0;
}
画十字形
int main() {
//pen.fd(100).bk(200):画笔前进100步,后退200步
pen.fd(100).bk(200);
//pen.fd(100).rt(90):画笔前进100步,右转90度
pen.fd(100).rt(90);
pen.fd(100).bk(200);
return 0;
}
边栏推荐
- Sensor: DS1302 clock chip and driver code
- Pioneer of Web3: virtual human
- 遇到慢SQL该怎么办?(下)
- Use of pgpool II and pgpooladmin
- 【论文阅读|深读】 GraphSAGE:Inductive Representation Learning on Large Graphs
- Here comes a white paper to uncover the technology behind Clickhouse, a node with 10000 bytes!
- 差异与阵列和阵列结构和链表的区别
- go swagger使用
- Introduction to the internal structure of the data directory of PostgreSQL
- 人脸识别应用解析
猜你喜欢
leetcode:5. 最长回文子串【dp + 抓着超时的尾巴】
【论文阅读|深读】RolNE: Improving the Quality of Network Embedding with Structural Role Proximity
Increase 900w+ playback in 1 month! Summarize 2 new trends of top flow qiafan in station B
建议收藏!!Flutter状态管理插件哪家强?请看岛上码农的排行榜!
[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files
Processing image files uploaded by streamlit Library
Lumion 11.0 software installation package download and installation tutorial
Alibaba cloud middleware open source past
3D laser slam: time synchronization of livox lidar hardware
Lombok同时使⽤@Data和@Builder 的坑
随机推荐
B站6月榜单丨飞瓜数据UP主成长排行榜(哔哩哔哩平台)发布!
【森城市】GIS数据漫谈(二)
Pgadmin4 of PostgreSQL graphical interface tool
Lumion 11.0软件安装包下载及安装教程
遇到慢SQL该怎么办?(下)
New generation cloud native message queue (I)
unity 自定义webgl打包模板
Pioneer of Web3: virtual human
新一代云原生消息队列(一)
3--新唐nuc980 kernel支持jffs2, Jffs2文件系统制作, 内核挂载jffs2, uboot网口设置,uboot支持tftp
[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files
CDB PDB user rights management
Use of fiddler
leetcode:736. LISP syntax parsing [flowery + stack + status enumaotu + slots]
Untiy文本框的代码换行问题
一本揭秘字节万台节点ClickHouse背后技术实现的白皮书来了!
postgresql之整體查詢大致過程
STM32项目 -- 选题分享(部分)
真实项目,用微信小程序开门编码实现(完结)
ODBC database connection of MFC windows programming [147] (with source code)