当前位置:网站首页>慧通编程入门课程 - 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;
}
边栏推荐
- Stm32f4 --- PWM output
- Difference and the difference between array and array structure and linked list
- 【服务器数据恢复】raid损坏导致戴尔某型号服务器崩溃的数据恢复案例
- Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
- 进程管理基础
- MFC Windows 程序设计[147]之ODBC数据库连接(附源码)
- Halcon instance to opencvsharp (C openCV) implementation -- bottle mouth defect detection (with source code)
- AWS学习笔记(一)
- 3 -- Xintang nuc980 kernel supports JFFS2, JFFS2 file system production, kernel mount JFFS2, uboot network port settings, and uboot supports TFTP
- Why am I warned that the 'CMAKE_ TOOLCHAIN_ FILE' variable is not used by the project?
猜你喜欢

argo workflows源码解析
![[paper reading | deep reading] rolne: improving the quality of network embedding with structural role proximity](/img/21/59c4d61b22e7d021b7a72a64a16b48.png)
[paper reading | deep reading] rolne: improving the quality of network embedding with structural role proximity

C#/VB.NET 删除Word文檔中的水印

Lumion 11.0软件安装包下载及安装教程

Processing image files uploaded by streamlit Library

1--新唐nuc980 NUC980移植 UBOOT,从外部mx25l启动

低代码平台中的数据连接方式(上)

Decryption function calculates "task state and lifecycle management" of asynchronous task capability

Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem

Summer Challenge database Xueba notes (Part 2)~
随机推荐
Alibaba cloud middleware open source past
4--新唐nuc980 挂载initramfs nfs文件系统
The last line of defense of cloud primary mixing department: node waterline design
A new path for enterprise mid Platform Construction -- low code platform
【森城市】GIS数据漫谈(二)
6-6漏洞利用-SSH安全防御
This week's hot open source project!
豆瓣平均 9.x,分布式领域的 5 本神书!
Increase 900w+ playback in 1 month! Summarize 2 new trends of top flow qiafan in station B
如何设计好接口测试用例?教你几个小技巧,轻松稿定
Summer Challenge database Xueba notes (Part 2)~
Recommended collection!! Which is the best flutter status management plug-in? Please look at the ranking list of yard farmers on the island!
STM32 project -- Topic sharing (part)
猿桌派第三季开播在即,打开出海浪潮下的开发者新视野
Web3的先锋兵:虚拟人
#yyds干货盘点# 解决名企真题:最大差值
3D laser slam: time synchronization of livox lidar hardware
Untiy文本框的代码换行问题
Ali yunyili: how does yunyuansheng solve the problem of reducing costs and improving efficiency?
ZABBIX 5.0: automatically monitor Alibaba cloud RDS through LLD