当前位置:网站首页>慧通编程入门课程 - 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;
}
边栏推荐
- Untiy文本框的代码换行问题
- Jacob Steinhardt, assistant professor of UC Berkeley, predicts AI benchmark performance: AI has made faster progress in fields such as mathematics than expected, but the progress of robustness benchma
- [C # notes] use file stream to copy files
- C#/VB. Net to delete watermarks in word documents
- Here comes a white paper to uncover the technology behind Clickhouse, a node with 10000 bytes!
- How to build a 32core raspberry pie cluster from 0 to 1
- Douban average 9 x. Five God books in the distributed field!
- CDB PDB 用户权限管理
- 6-6漏洞利用-SSH安全防御
- 差异与阵列和阵列结构和链表的区别
猜你喜欢
[paper reading | deep reading] anrl: attributed network representation learning via deep neural networks
unity 自定义webgl打包模板
[paper reading | deep reading] graphsage:inductive representation learning on large graphs
Alibaba cloud middleware open source past
B站6月榜单丨飞瓜数据UP主成长排行榜(哔哩哔哩平台)发布!
Station B's June ranking list - feigua data up main growth ranking list (BiliBili platform) is released!
1个月增长900w+播放!总结B站顶流恰饭的2个新趋势
The mega version model of dall-e MINI has been released and is open for download
Recommended collection!! Which is the best flutter status management plug-in? Please look at the ranking list of yard farmers on the island!
This week's hot open source project!
随机推荐
unity webgl自适应网页尺寸
The cities research center of New York University recruits master of science and postdoctoral students
【服务器数据恢复】raid损坏导致戴尔某型号服务器崩溃的数据恢复案例
你不可不知道的Selenium 8种元素定位方法,简单且实用
How do I dump SoapClient requests for debugging- How to dump SoapClient request for debug?
The boss is quarantined
STM32项目 -- 选题分享(部分)
Application analysis of face recognition
建议收藏!!Flutter状态管理插件哪家强?请看岛上码农的排行榜!
Recommended collection!! Which is the best flutter status management plug-in? Please look at the ranking list of yard farmers on the island!
新一代云原生消息队列(一)
[leetcode]Search for a Range
go swagger使用
Summer Challenge database Xueba notes (Part 2)~
Use of pgpool II and pgpooladmin
Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
postgresql之整体查询大致过程
猿桌派第三季开播在即,打开出海浪潮下的开发者新视野
The third season of ape table school is about to launch, opening a new vision for developers under the wave of going to sea
[server data recovery] data recovery case of a Dell server crash caused by raid damage