子版块

Python/Java/C程序设计

今日课程:0  |  课程总数:16
使用Python/Java/C程序编写机器人程序。 适用年龄: 10-18岁
admin
5582
******跳舞************************/void Dance(){ int i = 0; int j = 100; int rand_angles = 0; int rand_num = 0; while(1){ rand_angles = random(i) % 90 + 90; rand_num = random(j) % 2; if(rand_num == 1) turn_right(rand_angles); else turn_left(rand_angles); i++; j++; }}Dance();void main(){}/*******************念唐诗****************************/void Say_poem(){ gpp_say(1,"桃花溪"); gpp_say(1,"作者张旭"); gpp_say(1,"隐隐飞桥隔野烟,石矶西畔问渔船。 桃花尽日随流水,洞在清溪何处边。");}Say_poem();void main(){}/********************英语自我介绍**********************/void Introduce_E(){ gpp_say(1,"I am uwis robot,I will become your good friend,I will always stay with you");}Introduce_E();void main(){}/**********************跳舞说话*****************************/void Dance_Say(){ int i = 0; while(i <= 5) { gpp_say(1,"我是UWIS智能机器人"); turn_left(90); turn_right(90); gpp_say(1,"I am uwis intelligent robot"); turn_right(90); turn_right(50); gpp_say(1,"我会成为你的好朋友"); turn_left(90); turn_right(90); gpp_say(1,"I will become your good friend"); turn_right(90); turn_right(90); i++; }}Dance_Say();void main(){}/**********************扫地机器人*************************************/void Sweep_Floor(){ int distance = 0; while(1){ distance = distsensor(); if(distance < 5) turn_left(90); forward(5,10); wait(5); } }Sweep_Floor();void main(){}以上就是我简单介绍的几个例子。。。。。。。。。。
0   2017-12-05 10:08:18
暂无班级信息
等级:0级
优币:
好奇少年:
最新作业
左邻右舍
{"竞赛编程":"http://www.uwis.cn/uide/","课程编辑":"http://www.135editor.com/","成信大":"http://www.cuit.edu.cn","老版优唯思":"http://old.uwis.cn","图文发帖":"http://yz.uwis.cn/index.php?c=edit&type=read&pyteditorload=no"}

©2015 - 2024 优唯思编程   |   Copyright 2015 All Rights 成都优威骐骥教育科技有限公司  |  网站备案号:蜀ICP备16015136号