登陆 | 注册 设为首页 | 加入收藏 | 联系我们
太和养老网
热词老年艺术  助老机构  养老系统  

中心区域北京 天津 河北 山西 内蒙古 辽宁 吉林 黑龙江 上海 江苏 浙江 安徽 福建 江西 山东 河南 湖北 湖南 广东 广西 海南 重庆 四川 贵州 云南 西藏 陕西 甘肃 青海 宁夏 新疆 香港 澳门 台湾 全国城市养老院目录 全国县市养老院汇总目录 太和AI作品展 太和养老艺术网AI作品展示

讲解:CSC148H1、Python、data、Python Statistics、、|-飞

 

2023/7/6 17:08:32 ('互联网')

2020/3/14 Assignment 2: CSC148H1 S 20201:Introduction to Computer Sciencehttps://q.utoronto.ca/courses/130571/pages/assignment-2 1/14Assignment 2CSC148:Assignment 2: BlockyDue date: Tuesday, March 31, 2020 before noon sharp (not 12:10).You may complete this assignment individually or with a partner who can be from any section ofthe course.Learning goalsBy the end of this assignment, you should be able to:model hierarchical data using treesimplement recursive operations on trees (both non-mutating and mutating)convert a tree into a flat, two-dimensional structureuse inheritance to design classes according to a common interfaceCoding GuidelinesThese guidelines are designed to help you write well-designed code that will adhere to theinterfaces we have defined (and thus will be able to pass our test cases).You must:write each method in such a way that the docstrings you have been given in the starter codeaccurately describe the body of the method.avoid writing duplicate code.write a docstring for any class, function, or method that lacks one.You must NOT:change the parameters, parameter type annotations, or return types in any of the methods orfunction you have been given in the starter code.add or remove any parameters in any of the methods you have been given in the starter code.change the type annotations of any public or private attributes you have been given in thestarter code.create any new public attributes.create any new public methods.write a method or function that mutates an object if the docstring doesn’t that it will bemutated.add any more import statements to your code, except for imports from the typing module.You may find it helpful to:2020/3/14 Assignment 2: CSC148H1 S 20201:Introduction to Computer Sciencehttps://q.utoronto.ca/courses/130571/pages/assignment-2 2/14create new private helper methods or functions for the classes you have been given.if you create new private methods or functions you must provide type annotations for everyparameter and return value. You must also write a full docstring for this method asdescribed in the function design recipe(https://q.utoronto.ca/courses/130571/files/5593988/download) *create new private attributes for the classes you have been given.if you create new private attributes you must give them a type annotation and include adescription of them in the class’s docstring as described in the class design recipe(https://q.utoronto.ca/courses/130571/files/5594041/download) *import more objects from the typing moduleoverride the inherited version of the __eq__ special method in some cases (this is not thesame as creating a new public method).While writing your code you can assume that all arguments passed to the methods and functionsyou have been given in the starter code will respect the preconditions and type annotationsoutlined in the methods’ docstrings.Introduction: the Blocky gameBlocky is a game with simple moves on a simple structure. But, like a Rubik’s Cube, it is quitechallenging to play. The game is played on a randomly-generated game board made of squaresof four different colours, such as this:(https://q.utoronto.ca/courses/130571/files/6426939/download?wrap=1)Each player has their own goal that they are working towards, such as creating the largestconnected “blob” of blue. After each move, the player sees their score, which is determined byhow well they have achieved their goal and which moves they have made. The game continuesfor a certain number of turns, and the player with the highest score at the end is the winner. Next,let’s look in more detail at the rules of the game and the different ways it can be configured forplay.The Blocky board and terminologyWe call the game board a ‘block’, which is best defined recursively. A block is either:2020/3/14 Assignment 2: CSC148H1 S 20201:Introduction to Computer Sciencehttps://q.utoronto.ca/courses/130571/pages/assignment-2 3/14a square of one colour, ora square that is subdivided into 4 equal-sized blocks.The larges



扫码加微信详细咨询太和智慧养老产品和平台服务!

 

 





版权声明:

---------------------------------------------------------------


所有信息来源于互联网,本文的版权归原作者所有,不代表本网观点和立场。

本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,请发送邮件至 81480447@qq.com 举报,一经查实,本站将立刻删除。



扫码加微信详细咨询太和智慧养老产品和平台服务!

 

养老资讯
助老机构介绍
评论
已有 0 条评论

最新评论

推荐养老院

您希望养老院位于
  • 不限
  • 东城
  • 西城
  • 崇文
  • 宣武
  • 朝阳
  • 丰台
  • 石景山
  • 海淀
  • 门头沟
  • 房山
  • 通州
  • 顺义
  • 昌平
  • 大兴
  • 怀柔
  • 平谷
  • 延庆
  • 密云
您希望的价格范围
  • 不限
  • 500以下
  • 500-1000
  • 1000-2000
  • 2000-3000
  • 3000-5000
  • 5000以上
老人的情况是
  • 不限
  • 自理
  • 半自理
  • 全护理
  • 特护

姓名

年龄

电话

全国城市养老院



关于我们 | 联系方式 | 网站地图 | 友情链接

Copyright 2010-2022 京ICP备18035644号-3 北京太和 版权所有