python牛蛙游戏设计和线性回归课件.pptx

上传人(卖家):三亚风情 文档编号:2868447 上传时间:2022-06-06 格式:PPTX 页数:15 大小:1.18MB
下载 相关 举报
python牛蛙游戏设计和线性回归课件.pptx_第1页
第1页 / 共15页
python牛蛙游戏设计和线性回归课件.pptx_第2页
第2页 / 共15页
python牛蛙游戏设计和线性回归课件.pptx_第3页
第3页 / 共15页
python牛蛙游戏设计和线性回归课件.pptx_第4页
第4页 / 共15页
python牛蛙游戏设计和线性回归课件.pptx_第5页
第5页 / 共15页
点击查看更多>>
资源描述

1、Wonderful frog game1Anan An Sep.2016simple introduction :A racquet, represented as a short line segment, can be moved to and fro across the bottom of the window by key presses or by mouse dragging.Frogs would move in the window with a random speed and direction.Each frog bounces off the top, left an

2、d right edges of the window, and off the racquet at the bottom. A frog misses the racquet at the bottom is lost.The frogs bounce each other when they collide.2game introduction :The player scores a point every time when frogs hit the top of the windows .All frogs lost off the bottom of the window, t

3、he game is end.34FrogImagerectlefttopspeedStatus_init_ ()move ()ReflectorImagerectlefttopspeedstatus_init_ ()move ()MainFrameplay() animateplayerspygame.sprite.SpriteScoreMoniterpointsscore_textClass Hierarchymyplayer.py5v base class: pygame.sprite.Sprite: simple base class for visible game objects.

4、v Methods: animate (): animation function ,Collision Detection,build panel, frog and scoring in screen. play (): game startv Class Frog: Define frog classvariables: image:the image of a frog.rect:the rectangle size of a frog imageleft: the left coordinate of a frog rectangle top:the top coordinate o

5、f a frog rectangle speed:the moving speed and direction of a frogstatus:the moving status of a frog methods: _init_():initial a frog move():move a frogv Class Reflector: Define Reflector classvariables: image:the image of a reflector.rect:the rectangle size of a reflector imageleft: the left coordin

6、ate of a reflector rectangle top:the top coordinate of a reflector rectangle speed:the moving speed and direction of a reflectorstatus:the moving status of a reflector methods: _init_():initial a reflector move():move a reflectorTest case for Frog classTechnical: start the game, frogs are created an

7、d moved automatically Code coverage: play, ball, animate8MethodsDescriptionInput Expected outputActual output_init_()Check if the frog shows correctly when initial the game imageFile & location &SpeedThe frog appears in the settled location of screenThe frog appears in the settled location of screen

8、 move()Move a frogA frog can move with random direction and speedA frog can move with random direction and speedTest case for Reflector classTechnical: start the game, racquet created and moved by mouse dragging or key presses.Code coverage: play, ball, animate9MethodsDescriptionInput Expected outpu

9、tActual output_init_()Check if the reflector shows correctly when initial the game imageFile & location &SpeedThe reflectorappears at the bottom of screenThe reflectorappears at the bottom of screen move()Move a reflectorA reflectorcan move with fixed speedA reflectorcan movewith fixed speed10Linear

10、 regression by PythonEntry No.Square FeetPrice11506450220074503250845043009450535011450640015450760018450PREDICTING HOUSE PRICESWe have the following dataset and core codes:Withlinearregression,weknowthatwehavetofindalinearitywithinthedatasowecanget0and1Ourhypothesisequationlookslikethis:11Result12PredictwhichofthefollowingtwoserieswillhaveawideraudienceWe have the following dataset:1314Result15 thanks

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 办公、行业 > 各类PPT课件(模板)
版权提示 | 免责声明

1,本文(python牛蛙游戏设计和线性回归课件.pptx)为本站会员(三亚风情)主动上传,163文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
2,用户下载本文档,所消耗的文币(积分)将全额增加到上传者的账号。
3, 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(发送邮件至3464097650@qq.com或直接QQ联系客服),我们立即给予删除!


侵权处理QQ:3464097650--上传资料QQ:3464097650

【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。


163文库-Www.163Wenku.Com |网站地图|