99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

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

代寫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++程序
  • 下一篇:小花分期自動下款怎么客服?小花分期客服電話是什么?
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網 排行網

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

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

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                三叶草欧洲码在线| 久久高清内射无套| 久久99久久98精品免观看软件| 日韩黄色一级大片| 91网址在线观看精品| 青青青在线视频| 亚洲永久精品视频| 精品国产一二区| 中文字幕亚洲乱码| 蜜臀aⅴ国产精品久久久国产老师 蜜臀99久久精品久久久久小说 | 97人妻一区二区精品视频| 欧美成人精品欧美一级| av网页在线观看| 天天操精品视频| 激情文学亚洲色图| 亚洲色图欧美日韩| 人妻少妇精品一区二区三区| 99精品欧美一区二区| 三年中国中文观看免费播放| 国产精品热久久| 亚洲国产精品久久久久爰性色 | 中国一级免费毛片| 久久青青草视频| 丰满饥渴老女人hd| 在线视频 日韩| 青青操视频在线播放| 国产91麻豆视频| 中字幕一区二区三区乱码| 欧洲美女亚洲激情| 激情图片中文字幕| 懂色av蜜臀av粉嫩av喷吹 | 国产精品久久久久久久久久久久久久久久久久 | 亚洲精品www.| 国产午夜麻豆影院在线观看| 欧美激情精品久久久久久免费| 下面一进一出好爽视频| 不卡的av中文字幕| 日韩va亚洲va欧美va清高| 亚洲免费成人在线视频| 国产污污视频在线观看| 亚洲成人av免费看| 国产午夜福利一区| 天天舔天天操天天干| 波多野结衣一本一道| 日日噜噜噜噜久久久精品毛片| 国产精品国产三级国产专业不| 伊人影院在线观看视频| 少妇毛片一区二区三区| 欧美一级特黄视频| 免费黄色av网址| 久久久精品福利| 精品一区在线视频| 国产污视频在线看| 国产精品美女久久久久av爽| 91精品人妻一区二区三区| 亚洲国产综合av| 色欲无码人妻久久精品| 日本免费不卡视频| 欧美在线精品一区二区三区| 久久午夜鲁丝片午夜精品| 久久精品综合视频| 精品人妻二区中文字幕| 激情五月婷婷网| 精品国产大片大片大片| 国产在线综合视频| 国产又粗又黄视频| 国产原创精品在线| 国产资源中文字幕| 精品人妻无码一区二区色欲产成人| 国产一级淫片a视频免费观看| 国产情侣久久久久aⅴ免费| 国产免费av一区二区| 国产熟女精品视频| 后入内射无码人妻一区| 久草视频中文在线| 免费成人美女女在线观看| 男人天堂网在线视频| 日本黄色免费片| 色啦啦av综合| 亚洲 日本 欧美 中文幕| 无码人妻久久一区二区三区蜜桃| 五月婷婷在线播放| 中文字幕av一区二区三区人妻少妇| 亚洲AV成人无码网站天堂久久| 一区二区三区在线免费观看视频 | 91在线观看喷潮| www.色播.com| 国产五月天婷婷| 免费不卡的av| 手机在线免费毛片| 中文字幕观看av| xxxwww国产| 精品国产乱码久久久久夜深人妻 | 国语对白永久免费| 久久免费精品国产| 日本护士做爰视频| 中文无码精品一区二区三区| 一级黄色免费网站| 国产三级漂亮女教师| 免费黄色一级网站| 午夜精品无码一区二区三区| 亚洲欧美另类一区| 国产免费视频一区二区三区| 精品在线播放视频| 天堂网av手机版| 2014亚洲天堂| 国产麻豆a毛片| 久久久久久久久久久国产精品| 色婷婷av国产精品| 亚洲精品免费在线观看视频 | 水蜜桃av无码| 亚洲精品成人无码| 国产情侣久久久久aⅴ免费| 欧美日韩精品区别| 中文字幕一区2区3区| 国产精品国产精品国产| 欧美 日韩 综合| 中文字幕精品三级久久久| www.涩涩涩| 欧美成人三级在线观看| 亚洲熟女乱综合一区二区三区| 国产亚洲色婷婷久久| 三级网站在线免费观看| 99久久精品国产一区色| 久一区二区三区| 亚洲精品视频专区| 久草视频福利在线| 中国一级特黄视频| 好男人在线视频www| 熟妇高潮一区二区| 国产黄色小视频在线观看| 欧美日韩一区二区三区69堂| 亚洲视频在线a| 欧美成人一区二区三区高清| 欧美三级韩国三级日本三斤在线观看| 久久久久中文字幕亚洲精品| 日韩高清一二三区| 亚洲一级二级片| 六月婷婷综合网| 亚洲一卡二卡在线| 潘金莲激情呻吟欲求不满视频| 亚洲欧美激情另类| 人妻aⅴ无码一区二区三区| 一级日韩一级欧美| 日韩精品一区二区三区在线视频| 99热这里只有精品66| 视频一区二区免费| 国产传媒免费在线观看| 无码精品人妻一区二区三区影院| 国产精品第9页| 中文字幕在线永久| 欧美精品一级片| 波多野结衣一二三四区| 午夜影院免费视频| 久久艹免费视频| eeuss中文字幕| 亚洲成人av综合| 麻豆成人免费视频| 国产高清免费观看| 天天操天天干天天| 国产又粗又猛又爽又黄| 亚洲欧美精品久久| 色男人天堂av| 久久久午夜影院| 国产精品热久久| 一级黄色大片免费观看| 手机av在线网| 久久aaaa片一区二区| 绯色av蜜臀vs少妇| 中文字幕在线视频一区二区| 日本天堂在线视频| 国内av在线播放| www.啪啪.com| 亚洲欧美黄色片| 永久久久久久久| 日本特黄特色aaa大片免费| 久草视频福利在线| 国产精品久久久久久久久久久久久久久久久久 | 亚洲精品国产欧美在线观看| 日韩成人一区二区三区| 久久久国产精品成人免费| 丰满人妻妇伦又伦精品国产| 亚洲精品一区二区三区四区| 四虎精品一区二区| 人妻少妇精品无码专区| 久久久久久国产精品视频| 国产伦精品一区二区三区视频女| 91福利视频免费观看| 中文字幕视频三区| 午夜精品免费看| 日日噜噜噜噜久久久精品毛片| 一区二区三区黄| 久久精品国产亚洲av麻豆蜜芽| 亚洲无码久久久久久久| 日韩伦人妻无码| 精品人妻无码一区| www亚洲色图| 亚洲精品97久久中文字幕无码| 麻豆一区二区三区精品视频 | 视频二区在线播放|