当前位置:网站首页>慧通编程入门课程 - 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;
}
边栏推荐
- Recommended collection!! Which is the best flutter status management plug-in? Please look at the ranking list of yard farmers on the island!
- Gee upgrade can realize one piece of run tasks
- 【Unity】升级版·Excel数据解析,自动创建对应C#类,自动创建ScriptableObject生成类,自动序列化Asset文件
- CDB PDB 用户权限管理
- MetaForce原力元宇宙佛萨奇2.0智能合约系统开发(源码部署)
- fiddler的使用
- 新一代云原生消息队列(一)
- 4--新唐nuc980 挂载initramfs nfs文件系统
- Seconds understand the delay and timing function of wechat applet
- Overall query process of 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
豆瓣平均 9.x,分布式领域的 5 本神书!
leetcode:736. LISP syntax parsing [flowery + stack + status enumaotu + slots]
postgresql之整体查询大致过程
The boss is quarantined
Increase 900w+ playback in 1 month! Summarize 2 new trends of top flow qiafan in station B
Integerset of PostgreSQL
如何设计好接口测试用例?教你几个小技巧,轻松稿定
Argo workflows source code analysis
Decryption function calculates "task state and lifecycle management" of asynchronous task capability
随机推荐
PostgreSQL图形化界面工具之pgAdmin4
人脸识别应用解析
【论文阅读|深读】DNGR:Deep Neural Networks for Learning Graph Representations
Douban average 9 x. Five God books in the distributed field!
ODBC database connection of MFC windows programming [147] (with source code)
[leetcode] day97 remove linked list elements
C语言练习题_1
Application analysis of face recognition
[unity notes] screen coordinates to ugui coordinates
低代码平台中的数据连接方式(上)
C # / vb. Net supprime le filigrane d'un document word
【Node学习笔记】chokidar模块实现文件监听
Sensor: introduction of soil moisture sensor (xh-m214) and STM32 drive code
【服务器数据恢复】raid损坏导致戴尔某型号服务器崩溃的数据恢复案例
postgresql之integerset
String or binary data will be truncated
How do I dump SoapClient requests for debugging- How to dump SoapClient request for debug?
Collection recommandée!! Quel plug - in de gestion d'état flutter est le plus fort? Regardez le classement des manons de l'île, s'il vous plaît!
Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
建議收藏!!Flutter狀態管理插件哪家强?請看島上碼農的排行榜!