当前位置:网站首页>慧通编程入门课程 - 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;
}
边栏推荐
- Web3对法律的需求
- [leetcode]Search for a Range
- Web3的先锋兵:虚拟人
- PostgreSQL图形化界面工具之pgAdmin4
- STM32项目 -- 选题分享(部分)
- What to do when encountering slow SQL? (next)
- How can reinforcement learning be used in medical imaging? A review of Emory University's latest "reinforcement learning medical image analysis", which expounds the latest RL medical image analysis co
- 新一代云原生消息队列(一)
- Station B's June ranking list - feigua data up main growth ranking list (BiliBili platform) is released!
- 长安链学习笔记-证书研究之证书模式
猜你喜欢

Douban average 9 x. Five God books in the distributed field!

Processus général de requête pour PostgreSQL

String or binary data will be truncated

压缩 js 代码就用 terser

Lombok makes the pit of ⽤ @data and @builder at the same time

Go swagger use

15million employees are easy to manage, and the cloud native database gaussdb makes HR office more efficient

Linear list --- circular linked list

Integerset of PostgreSQL
![[server data recovery] data recovery case of a Dell server crash caused by raid damage](/img/29/e07bf1f8eae9be19f6eed69be5642d.jpg)
[server data recovery] data recovery case of a Dell server crash caused by raid damage
随机推荐
Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
Untiy文本框的代码换行问题
leetcode:736. Lisp 语法解析【花里胡哨 + 栈 + 状态enumaotu + slots】
Sensor: DS1302 clock chip and driver code
如何设计好接口测试用例?教你几个小技巧,轻松稿定
leetcode:5. 最长回文子串【dp + 抓着超时的尾巴】
Increase 900w+ playback in 1 month! Summarize 2 new trends of top flow qiafan in station B
【森城市】GIS数据漫谈(二)
CDB PDB user rights management
Several classes and functions that must be clarified when using Ceres to slam
argo workflows源码解析
Lumion 11.0 software installation package download and installation tutorial
【论文阅读|深读】 GraphSAGE:Inductive Representation Learning on Large Graphs
【软件测试】最全面试问题和回答,全文背熟不拿下offer算我输
6-6漏洞利用-SSH安全防御
Word wrap when flex exceeds width
MetaForce原力元宇宙佛萨奇2.0智能合约系统开发(源码部署)
leetcode:736. LISP syntax parsing [flowery + stack + status enumaotu + slots]
#yyds干货盘点# 解决名企真题:最大差值
Leetcode:minimum_depth_of_binary_tree解决问题的方法