国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫0CCS0CSE、代做Python編程設計
代寫0CCS0CSE、代做Python編程設計

時間:2025-02-05  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



Introduction to CS & Engineering (0CCS0CSE)
Homework
Due Friday Feb. 7
th
, 11am
Activity
Chess is a two-player board game, played on a chequered board where pieces are moved
according to precise rules (see Table 1). The object of the game is to attack the opponent’s
king in such a way that escape is impossible (checkmate). Each square on a chess board
can be described by a letter (file) and number (rank). For example, in Figure 1, square
b4 is on file b and rank 4.
Figure 1: Chess board positions. (www.logicalchess.com)
For this homework assignment you will design and implement two functions. The first
function, position(piece, loc), takes the name of a chess piece and its position, and
returns all the squares that piece can reach after a single move is made. The second
function, getTo(piece, loc1, loc2), takes the name of a chess piece, two positions,
and returns true if the piece can reach the second position in exactly two moves. Assume
there are no other pieces on the board.
1Chess Pieces
Piece Moves
King Moves one square in any direction.
Queen Any number of squares diagonally, horizontally, or vertically.
Rook Any number of squares horizontally or vertically.
Bishop Any number of squares diagonally.
Knight In an ‘L-shape,’ two squares in a straight direction, and
then one square perpendicular to that.
Pawn One square forward
Table 1: Valid piece names and a description of how they move.
Requirements
1. The program should contain at least 3 functions. Furthermore, it should demonstrate
 an understanding how and when to use functions.
2. The program must contain and use the functions position(piece, loc) and getTo(piece,
loc1, loc2)
3. The program should be written without using the chr() function, the ord() function,
 tuples, list comprehension, or nested functions (i.e., closures & decorators)
4. All of your code should be within a function, i.e., no global variables
5. Follow all submission requirements
position(piece, loc)
1. The function accepts full piece names, e.g., King, Rook or Queen, as a string. The
function should be case insensitive, that is, King, king, and KING are treated the
same.
2. The function should accept positions, as a string, in file-rank format, e.g., b5, h8 or
f3. The function should be case insensitive, that is, b3 and B3 are treated same.
3. The function should return a list; the order of the chess squares in the list does not
matter.
4. If an invalid piece is passed to the function, i.e., a piece not found in Table 1, the
function should return an empty list
5. If the position of the piece is invalid, the function should return an empty list
6. If the piece is in a position where it has no valid moves, the function should return
an empty list
2getTo(piece, loc1, loc2)
1. The function accepts full piece names, e.g., King, Rook or Queen, as a string. The
function should be case insensitive, that is, King, king, and KING are treated the
same.
2. The function should accept positions, as a string, in file-rank format, e.g., b5, h8 or
f3. The function should be case insensitive, that is, b3 and B3 are treated same.
3. The function should return True or False. If the piece can get from position 1
to position 2 in exactly two moves, the function should return True, otherwise it
should return False.
4. If the piece can get from position 1 to position 2 in one move, return False
5. If the piece is already on position 2, return False
6. The function must use the position(piece, loc) function appropriately.
Sample Test Cases
For testing purposes, here are some of the test cases your submission must pass.
1 position ('King ', 'f3 ')
2 # Returns ['e4 ','f4 ','g4 ','e3 ','g3 ','e2 ','f2 ','g2 ']
3
4 position ('Rook ','i4 ')
5 # Returns []
6
7 position ('knight ','d4 ')
8 # Returns ['e6 ','f5 ','f3 ','e2 ','b3 ','c2 ','b5 ','c6 ']
9
10 getTo ('king ', 'e1 ', 'e3 ')
11 # Returns True
12
13 getTo ('pawn ', 'c2 ', 'c8 ')
14 # Returns False
15
16 getTo ('knight ', 'g1 ', 'e5 ')
17 # Returns True
3Submission Instructions
Failure to follow all submission instructions may result in a lower grade.
1. At the top of your program put the following comments:
# [Your Full Name]
# [Your K number]
# Homework 1
2. Name your solution hw1.py —exactly as you see it here. One word all lowercase,
with the *.py extension.
3. Submit the Python file (*.py) on KEATS —You do not need to include a cover
sheet
4. If asked for a submission title, enter your full name.
Marking
The mark is split 60% functionality and 40% implementation. Meaning, if your program
works and passes all test cases you automatically get a 60. The remaining 40% will be
given based on how well you implemented your solution., e.g., appropriate use of functions,
 use of descriptive variable names, following submission instructions, and meeting
program requirements.
Note:
• if your program crashes during testing, you will receive a 40 regardless
of the error that caused the crash
• if your program uses any of the following, chr() function, the ord() function,
 tuples, list comprehension, or nested functions (i.e., closures & decorators),
 you will receive a zero
• any submission that significantly deviates from the assignment will receive
 a zero.
Rubric for Implementation
• Requirements. All specified requirements have been met (15 points)
• Functions. The solution demonstrates good use of functions; the code is reusable;
the code is efficient without sacrificing readability; and the solution is well organised
and easy to understand (15 points)
• Variable & function names. The solution uses meaningful identifier names, i.e.,
good function and variables names (5 points)
• Comments. The solution contains function level comments; few in-line comments
are used; and comments do not make code difficult to read/understand (5 points)
4Late Submission Policy
All coursework must be submitted on time. If you submit coursework late and have not
applied for an extension or have not had a mitigating circumstances claim upheld, you
will have an automatic penalty applied. If you submit late, but within 24 hours of the
stated deadline, the work will be marked, and 10 raw marks will be deducted. All work
submitted more than 24 hours late will receive a mark of zero.
• Any program submitted within 24 hours after the deadline will lose 10 points
• Any program submitted after the 24 hour grace period will receive a 0


請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp





 

掃一掃在手機打開當前頁
  • 上一篇:ENG 5220代做、代寫Java/Python/c++程序
  • 下一篇:小花分期自動下款怎么客服?小花分期客服電話是什么?
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 豆包網頁版入口 破天一劍 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产精品视频久久久| 国产精品国产精品| 欧美中日韩一区二区三区| 中文字幕中文字幕在线中心一区| 国产精品久久久久久久久粉嫩av| 久久久久久国产精品mv| 国产成人一区二| 69**夜色精品国产69乱| 91免费人成网站在线观看18| 国产精品有限公司| 91免费欧美精品| 日韩亚洲精品视频| 国产精品传媒毛片三区| 久久久久久国产| 亚洲欧美精品| 欧美在线视频观看免费网站| 激情小说网站亚洲综合网| 国产精品永久免费在线| 久久天天狠狠| 另类专区欧美制服同性| 午夜精品视频在线| 蜜桃视频成人在线观看| 7777精品久久久大香线蕉小说| 久热99视频在线观看| 亚洲在线色站| 免费在线观看的毛片| 91禁国产网站| 国产精品国产精品国产专区蜜臀ah| 亚洲一区影院| 欧美xxxx黑人又粗又长密月| 91精品国产自产91精品| 久久国产精品电影| 欧美一级大胆视频| 久久久亚洲精选| 一道本在线观看视频| 精品午夜一区二区| 国产精品乱码一区二区三区| 日产精品久久久一区二区| 隔壁老王国产在线精品| 久久亚洲国产精品| 激情小说综合区| 久久久久一本一区二区青青蜜月| 91久久精品美女高潮| 日本女人高潮视频| 精品视频高清无人区区二区三区| 国产aⅴ精品一区二区三区黄| 欧美 日韩 国产一区| zzijzzij亚洲日本成熟少妇| 日本高清视频一区| 久久久久久久久久网| 日本一区二区三区视频在线播放 | 国产精品夜夜夜爽张柏芝 | 国产精品黄视频| 国内成+人亚洲| 欧美伦理91i| 91好吊色国产欧美日韩在线| 五月天综合婷婷| 久久久久久久久久久成人| 欧美午夜精品久久久久免费视| 国产精品流白浆视频| 97久久精品国产| 国产伦精品一区二区三区四区视频_ | 日韩久久久久久久久久久久久| 国产精品国产三级国产aⅴ浪潮| caoporn国产精品免费公开| 激情五月宗合网| 成人免费视频久久| 懂色中文一区二区三区在线视频| 97久久精品国产| 日韩欧美精品久久| 国产精品第一区| 国产精品96久久久久久| 欧美亚洲国产日韩2020| 色综合91久久精品中文字幕| 国产一区深夜福利| 亚洲精品中文字幕乱码三区不卡| 国产v亚洲v天堂无码| 国产精品一区免费观看| 日韩免费在线观看av| 一区二区三区四区欧美| 日韩在线视频网站| 国产精品综合网站| 青青影院一区二区三区四区| 中文精品一区二区三区| 久久久久www| 久久riav| 91免费国产网站| 青青在线免费观看| 国产精品久久久久久久av大片| 国产美女久久久| 欧美日韩第二页| 日韩av免费看网站| 一本久道久久综合狠狠爱亚洲精品 | 欧美日本中文字幕| 国产精品入口福利| 久久久久人妻精品一区三寸| 97国产一区二区精品久久呦| 国产区二精品视| 国产午夜福利在线播放| 蜜桃视频成人| 国产日韩欧美成人| 国产欧美精品一区二区三区-老狼| 色综合久久久久无码专区| 亚洲天堂电影网| 亚洲一区免费看| 熟女视频一区二区三区| 手机成人av在线| 欧美一区二区高清在线观看| 亚洲va久久久噜噜噜久久天堂| 亚洲中文字幕久久精品无码喷水| 国产99视频精品免费视频36| 中文字幕日韩一区二区三区| 美女精品久久久| 亚洲人成网站在线观看播放| 日本精品免费在线观看| 国产在线精品一区二区中文| 亚洲欧洲中文| 一本一本a久久| 日本精品免费视频| 欧美尤物巨大精品爽| 国产中文字幕免费观看| 国产日韩av高清| 91精品国产综合久久香蕉922| 99re在线视频上| 久久久久久久成人| 国产精品成人国产乱一区| 亚洲午夜精品福利| 日韩一级免费看| 黄色片免费在线观看视频| 国产噜噜噜噜久久久久久久久 | 91久久精品美女高潮| 国产成人激情小视频| 国产精品久久久av| 亚洲一区二区三区加勒比| 日本欧美精品在线| 国产精品一区二区三区成人 | 久久伊人一区| 国产精品久久久久久久免费大片| 亚洲人成人77777线观看 | zzjj国产精品一区二区| 欧美区在线播放| 日韩欧美一区二区视频在线播放| 国产美女精品视频免费观看| 精品国产一区二区三区久久狼5月| 欧美激情小视频| 欧美二区在线视频| 久久99精品久久久水蜜桃| 亚洲一区二区精品在线| 国产一区二区三区精彩视频| 久久精品中文字幕一区| 日本成熟性欧美| 久久久久狠狠高潮亚洲精品| 中文字幕中文字幕在线中一区高清| 国内自拍欧美激情| 久久久国产一区二区三区| 五月天国产一区| 91高跟黑色丝袜呻吟在线观看| 真实国产乱子伦对白视频| 国产日韩在线精品av| 美女精品视频一区| 国产免费内射又粗又爽密桃视频| 国产精品入口福利| 欧美大陆一区二区| 国产精品久久久久久久久久久不卡 | 91传媒久久久| 欧美一区二区三区四区在线观看地址| 国产精品一区二区免费| 久久国产精品影片| 国产精品香蕉国产| 亚洲人成网站在线播放2019| 91精品国产91久久久久久最新 | 日韩在线中文视频| 欧美在线视频a| 国产精品国产一区二区| 国产精自产拍久久久久久| 亚洲欧美日韩国产成人综合一二三区| 97精品国产97久久久久久免费| 欧美一级黄色网| 中文视频一区视频二区视频三区| 国产精品国产三级欧美二区| 亚洲国产一区二区在线| 欧美h视频在线| 亚洲欧洲精品一区| 国产精品激情自拍| 久久视频在线观看免费| 欧美一区激情视频在线观看| 久久精品国产一区| 欧美性受xxxx黑人猛交88| 国产精品久久二区| 成人a级免费视频| 青青在线免费视频| 欧美日本国产在线| 日韩中文字幕av| 高清不卡日本v二区在线| 日韩网站在线免费观看| 国产精品入口夜色视频大尺度| 99中文字幕在线观看| 狠狠色噜噜狠狠狠狠色吗综合| 亚洲精品偷拍视频| 久久福利视频网|