国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女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一区二区三区在线观看| 久久久久久香蕉网| 国产内射老熟女aaaa| 日本一区视频在线播放| 久久深夜福利免费观看| 国产乱码精品一区二区三区日韩精品 | 日韩精品第1页| 欧美日韩第一视频| 久久精品视频中文字幕| 欧美精品九九久久| 久久精品国产亚洲7777| 国产高清自拍99| 国产精品久久久久久久久借妻| 114国产精品久久免费观看| 蜜桃传媒视频第一区入口在线看 | 国产精品对白刺激久久久| 99精彩视频| 国产精品一区而去| 久久精品电影网站| 日韩一区视频在线| 国产精品久久久久久久久免费看| 欧美成人午夜剧场免费观看| 久久久久久国产精品美女| 一区二区成人国产精品| 午夜美女久久久久爽久久| 欧美日韩视频在线一区二区观看视频| 精品亚洲欧美日韩| 91精品国产精品| 国产精品日韩一区| 无码内射中文字幕岛国片| 久久99国产精品自在自在app| 99热一区二区三区| 久久成人这里只有精品| 韩国一区二区av| 中文字幕av日韩精品| 日韩不卡一二区| 欧美激情网站在线观看| 日韩在线精品一区| 欧美精品在线免费播放| 日本国产一区二区三区| 无码人妻精品一区二区蜜桃百度| 九九热精品在线| 蜜月aⅴ免费一区二区三区| 久久精品国产99国产精品澳门| 日韩偷拍一区二区| 国产成人91久久精品| 久久精品国产精品亚洲| 色偷偷偷亚洲综合网另类| 久久免费国产精品1| 欧美精品一区二区三区四区五区 | 天天在线免费视频| 欧美一级片中文字幕| 欧美尤物一区| 成人国产精品色哟哟| 日韩一区二区在线视频| 色中色综合影院手机版在线观看| 亚洲色欲综合一区二区三区| 欧美伊久线香蕉线新在线| 国产视频999| 久久久久久久久久久国产| 一级黄色免费在线观看| 国产在线观看不卡| 不卡中文字幕av| 国产一区二区视频在线免费观看| 日本精品免费一区二区三区| 视频在线99re| 亚洲va国产va天堂va久久| 欧美日韩成人网| 午夜精品久久久久久久白皮肤 | 欧美日韩亚洲国产成人| 国产成一区二区| 日本伊人精品一区二区三区介绍| 成人精品一二区| 蜜臀久久99精品久久久久久宅男| 青青草原一区二区| 久久久久久久久网站| 日本免费成人网| 久久久久久亚洲精品中文字幕| 日本一区视频在线观看| 色777狠狠综合秋免鲁丝| 久久国产精品久久久久| 人妻内射一区二区在线视频| 成人亚洲综合色就1024| 国产精品国模在线| 日韩啊v在线| 久久99国产精品99久久| 精品国产免费av| 日本一区二区在线| 91免费在线观看网站| 国产精品嫩草影院久久久| 欧美做受高潮1| 91国内在线视频| 国产精品久久久久久久久久久久久 | 亚洲天堂av免费在线观看| 一本色道久久综合亚洲精品婷婷| 99视频免费播放| 三年中国中文在线观看免费播放 | 国产精品传媒毛片三区| 国产欧美日韩专区发布| 天天人人精品| 国产精品福利小视频| 色狠狠av一区二区三区香蕉蜜桃| 99久久久久国产精品免费| 九九精品视频在线| 国产精品一区二区三区毛片淫片| 国产精品成人国产乱一区| 国产欧美欧洲| 一区二区欧美日韩| 成人av免费电影| 久久久久久网址| 精品国产一区二区三区四区vr| 欧美一区二区.| 99久久激情视频| 热久久免费视频精品| 色噜噜亚洲精品中文字幕| 日韩av一级大片| 久久精品2019中文字幕| 精品无人区一区二区三区| 色就是色欧美| 欧美精品日韩三级| 日韩中文在线视频| 国产精品自拍首页| 国产精品高潮呻吟久久av黑人 | 一区二区三区免费看| 国产a级片免费看| 国产免费观看高清视频| 欧美日韩电影一区二区三区| 精品国产电影| 色婷婷综合久久久久| 国产日本欧美在线观看| 欧美二区在线看| 在线视频精品一区| 播播国产欧美激情| 国产高清精品在线观看| 国产高清不卡无码视频| 国产偷人视频免费| 欧美极品日韩| 欧美日韩国产精品一区二区 | 欧美激情图片区| 久久视频这里有精品| 99精品视频网站| 成 年 人 黄 色 大 片大 全| 成人福利视频网| 久久精品aaaaaa毛片| 一区二区不卡在线观看| 久久人人九九| 狠狠干 狠狠操| 一区精品视频| 日日橹狠狠爱欧美超碰| 亚洲一区二区中文字幕| 色一情一乱一伦一区二区三区丨| 日韩一区二区三区国产| 久久网站免费视频| 97精品国产97久久久久久春色| 精品一区日韩成人| 国产一二三四区在线观看| 亚洲人成人77777线观看 | 午夜欧美一区二区三区免费观看| 亚欧洲精品在线视频免费观看| 日韩a在线播放| 日韩视频一二三| 国产午夜伦鲁鲁| 91久久久久久国产精品| 久久久婷婷一区二区三区不卡| 国产成人精品免费久久久久| 久久久噜噜噜www成人网| 91久久国产自产拍夜夜嗨| 国内精品久久久久久久| 国产天堂视频在线观看| 极品美女扒开粉嫩小泬| 成人伊人精品色xxxx视频| 国产在线视频在线| 欧美牲交a欧美牲交| 久久久久福利视频| 国产精品久久久久国产a级| 亚洲综合中文字幕在线观看| 欧美亚洲色图视频| 国产伦精品一区二区三区免| 国产中文字幕日韩| 国产日本欧美视频| 日本wwww视频| 国产区二精品视| 久久久精品久久| 春色成人在线视频| 高清欧美性猛交| 久久露脸国产精品| 日韩在线视频国产| 午夜精品一区二区在线观看| 欧美一级免费播放| 国产综合中文字幕| 91精品国产综合久久久久久蜜臀 | 欧美一区激情视频在线观看| 久久国内精品一国内精品| 欧美亚洲另类在线一区二区三区| 亚洲制服欧美久久|