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

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代寫0CCS0CSE、代做Python編程設(shè)計
代寫0CCS0CSE、代做Python編程設(shè)計

時間:2025-02-05  來源:合肥網(wǎng)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





 

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

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲勞振動
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)40個行業(yè)
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)4
    超全面的拼多多電商運營技巧,多多開團(tuán)助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團(tuán)助手
    CAE有限元仿真分析團(tuán)隊,2026仿真代做咨詢服務(wù)平臺
    CAE有限元仿真分析團(tuán)隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養(yǎng) 十大衛(wèi)浴品牌排行 suno 豆包網(wǎng)頁版入口 wps 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    久久www视频| 色播五月综合| 国产精品一区二区欧美黑人喷潮水| 在线观看国产一区| 国产a级片免费观看| 激情成人开心网| 亚洲欧美成人一区| 国产精品免费区二区三区观看| 隔壁老王国产在线精品| 人妻熟女一二三区夜夜爱| 精品久久精品久久| 久久久久免费精品国产| 国产卡一卡二在线| 欧美日韩福利在线| 一区二区三区观看| 国产精品区一区| 久久亚洲一区二区| 国产拍精品一二三| 欧洲精品国产| 亚洲xxxx视频| 精品国产_亚洲人成在线 | 91成人在线视频观看| 韩国精品一区二区三区六区色诱| 午夜精品一区二区三区视频免费看| 国产精品久久久久久久av电影| 国产精品678| 国产欧美一区二区在线播放| 热门国产精品亚洲第一区在线| 中文字幕一区二区三区四区五区 | 午夜精品亚洲一区二区三区嫩草| 国产精品久久久久免费a∨| 久久亚洲精品欧美| 高清一区二区三区日本久 | 中文字幕欧美日韩一区二区| 国产国语刺激对白av不卡| 国产精品亚洲二区在线观看| 国内精品久久久久久影视8| 热久久这里只有精品| 天天综合中文字幕| 亚洲综合一区二区不卡| 欧美成人午夜剧场免费观看| 国产精品视频精品| 久久久久久久激情视频| 91av网站在线播放| 成人av在线亚洲| 国产美女主播在线| 狠狠97人人婷婷五月| 青草视频在线观看视频| 日本免费高清一区| 五月天综合婷婷| 亚洲最大成人网色| 永久免费看av| 在线播放豆国产99亚洲| 欧美激情精品久久久久久大尺度| 国产精品美女视频网站| 国产精品涩涩涩视频网站| 国产成人精品综合| 深夜福利日韩在线看| 久久久久久久网站| 深夜福利一区二区| 丝袜一区二区三区| www.欧美免费| 国产精品视频久久久久| 国产精品免费福利| 久久久国产精彩视频美女艺术照福利| 国产成人三级视频| 国产精品久久久久久久久久新婚| 国产精品久久久久av免费| 国产精品盗摄久久久| 欧美精品制服第一页| 欧美精品久久一区二区| 欧美激情第1页| 一区二区在线高清视频| 亚洲高清不卡一区| 欧美一区二区三区四区在线| 日本成人黄色免费看| 欧美在线精品免播放器视频| 欧美 日韩 国产在线观看| 蜜臀精品一区二区| 精品无码av无码免费专区| 国产一区二区在线视频播放| 国产拍精品一二三| 91久久久久久久久久久久久| 久久人人爽爽人人爽人人片av| 国产suv精品一区二区三区88区| 日韩在线欧美在线| 国产精品福利小视频| 欧美激情一区二区三级高清视频| 亚洲一区二区三区香蕉| 日韩av免费电影| 欧美精品免费观看二区| 国产奶头好大揉着好爽视频| 成人短视频在线观看免费| 国产freexxxx性播放麻豆| 日韩中文字幕第一页| 国产精品国产三级国产专区51| 欧美激情中文字幕乱码免费| 日韩一区国产在线观看| 欧美久久久久久| 国产美女久久精品| 国产成人短视频| 久久伊人91精品综合网站| 亚洲综合视频1区| 日韩精品不卡| 国产区一区二区| 国产成+人+综合+亚洲欧洲| 国产精品免费一区二区三区在线观看| 欧美激情网站在线观看| 日韩亚洲在线视频| 精品午夜一区二区三区| 91精品视频免费观看| 国产精品无码人妻一区二区在线| 一区二区视频国产| 日韩精品视频久久| 国产精品一区二区欧美| 久久国产精品久久| 久久成人亚洲精品| 日本a在线天堂| 国产精品一区二区a| 深夜福利国产精品| 一区二区三区精品国产| 欧美精品一区二区三区久久| 97成人在线免费视频| 国产精品久久久久久婷婷天堂| 亚洲一区二区三区精品视频| 欧美视频在线播放一区| 91免费福利视频| 国产精品久久国产| 色婷婷精品国产一区二区三区 | 亚洲乱码国产一区三区| 欧美xxxx黑人又粗又长精品 | zzjj国产精品一区二区| 亚洲综合中文字幕在线观看| 欧美性在线观看| 成人h在线播放| 国产精品久久中文| 日韩不卡视频一区二区| 成人在线免费观看一区| 国产精品免费久久久久影院| 欧美一区二区大胆人体摄影专业网站 | 久久久久久久激情| 欧美极品在线播放| 欧美极品日韩| 国产成人a亚洲精v品无码| 在线观看福利一区| 免费观看国产精品视频| 久久久久久有精品国产| 亚洲91精品在线亚洲91精品在线| 国产视频一区二区三区在线播放| 日韩视频精品在线| 日韩aⅴ视频一区二区三区| 国产精品尤物福利片在线观看| 国产精品区一区二区三含羞草| 日本不卡免费高清视频| 久久久在线视频| 亚洲色欲久久久综合网东京热| 国产一级做a爰片久久毛片男| 精品国产一区二区三区四区在线观看| 三级网在线观看| 91精品国产91久久久久久 | 久久国产精品一区二区三区| 午夜精品一区二区三区四区| 99视频免费观看蜜桃视频| 欧美激情精品久久久| 国产热re99久久6国产精品| 国产精品免费入口| 欧美这里只有精品| 久久久久久久有限公司| 日韩在线观看a| 91久久精品国产| 亚洲午夜精品福利| 国产精选久久久久久| 欧美日韩福利在线观看| 国产日韩av在线播放| 精品免费国产| 国产一区免费| 九九热这里只有精品6| 国产一区二区三区四区五区加勒比 | 国产精品沙发午睡系列| 热久久精品免费视频| 色妞色视频一区二区三区四区| 日韩av不卡电影| 久久国产手机看片| 日韩免费观看网站| 色婷婷综合久久久久| 日韩色妇久久av| www.国产精品一二区| 欧美精品久久久| 国产精品无码av无码| 激情视频小说图片| 欧美精品生活片| 国产欧美一区二区三区久久| 久久99精品久久久久久青青91| 国产女主播av| 伊人婷婷久久| 久无码久无码av无码| 日日噜噜噜夜夜爽爽| 神马国产精品影院av| 黄色a级片免费看| 精品卡一卡二|