加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

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

代寫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

    av中文字幕在线观看第一页| 日韩一区二区三区精品| 视频一区欧美精品| 国产一级成人av| 综合久久亚洲| 欧美xxxx做受欧美护士| 五月天久久777| 日韩精品一区二区三区中文字幕| 91av一区| 男女男精品网站| 久久精品国产68国产精品亚洲| 国产激情一区| 亚洲国产mv| 蜜臀av亚洲一区中文字幕| 999久久久亚洲| 日本亚洲免费观看| 欧美人成在线| 少妇高潮一区二区三区99| 另类图片国产| 欧美成人久久| 精品国精品国产自在久国产应用| 国产成人一区| 久久一区视频| 欧美一级在线| 波多视频一区| 免费精品视频最新在线| 亚洲精品成人| 99久久久久| 欧美大奶一区二区| 欧美成年网站| 日韩激情综合| 国产欧美日韩| 高清一区二区中文字幕| 在线观看一区视频| 日日夜夜综合| 成人国产网站| 91精品影视| 在线一区av| 日韩深夜视频| 亚洲精品永久免费视频| 欧美肥老太太性生活| 性一交一乱一区二区洋洋av| 亚洲精品99| 天天精品视频| 香蕉av一区二区| 国产一区二区三区四区老人| 久久精品亚洲人成影院| 久久三级福利| 久久久久蜜桃| 99免费精品| 亚洲天堂男人| 精品中文一区| 亚洲国产成人精品女人| 黄色在线一区| 亚洲精品123区| 中文亚洲字幕| 男女性色大片免费观看一区二区 | 日本视频免费一区| 久热成人在线视频| 免费在线观看成人av| 国产欧美日韩综合一区在线播放| 亚洲国产第一| 亚洲日韩成人| 国产精品亚洲欧美日韩一区在线 | 国产精品欧美三级在线观看| 韩国三级大全久久网站| 国产一区二区三区不卡视频网站| 亚洲免费成人av在线| 日韩精品中文字幕一区二区 | 国产精品videosex极品| av在线播放一区二区| 亚欧洲精品视频在线观看| 日韩激情精品| 久久久久国产| 亚洲专区欧美专区| 不卡av播放| 另类小说一区二区三区| 国产精品亚洲欧美一级在线| 日本中文字幕一区二区有限公司| 国产精品久久久网站| 在线日韩中文| 蜜桃av一区| avav成人| 久久综合另类图片小说| 最新精品国偷自产在线| 国产精品久久久久av蜜臀| 欧美精品羞羞答答| 阿v视频在线观看| 欧美91在线|欧美| 欧美三级一区| 红杏一区二区三区| 日韩一区二区免费看| av在线中出| 日本在线播放一区二区三区| 亚洲区小说区图片区qvod按摩| 日本a级不卡| 久久xxxx精品视频| 日韩黄色三级在线观看| 国产a久久精品一区二区三区| 欧美三级视频| 奶水喷射视频一区| 欧美成人免费全部网站| 国产亚洲欧美日韩在线观看一区二区 | 欧美大奶一区二区| 亚洲综合好骚| 欧美一区二区三区久久精品茉莉花| 综合久草视频| 99成人超碰| 色资源二区在线视频| 日本成人中文字幕在线视频| 日韩精品三级| 国产精品呻吟| 国产欧美日韩亚洲一区二区三区| 国产亚洲一区| 国产精品91一区二区三区| 成人福利视频| 亚洲综合小说图片| 一本一本久久a久久综合精品 | 免费亚洲视频| 国产精品极品| 在线天堂资源www在线污| 成人豆花视频| 欧美二区视频| 久久天堂影院| 欧美三区视频| 国产美女高潮在线| 国产欧美日韩在线一区二区| 欧美日韩激情在线一区二区三区| 色老太综合网| 一区二区三区免费在线看| 蜜桃久久av| 国产精选久久| 亚洲中午字幕| 亚洲图片小说区| av亚洲免费| 久久一区欧美| 亚洲小说欧美另类婷婷| 国产69精品久久久久9999人| 999国产精品一区| 极品av在线| 日韩精品一区二区三区中文在线| 天堂va蜜桃一区二区三区漫画版 | 日日骚欧美日韩| 久久亚洲在线| 久久精品国产亚洲高清剧情介绍| 北条麻妃一区二区三区在线观看| 水蜜桃精品av一区二区| 国产精品免费大片| 蜜桃av一区| 日韩精品丝袜美腿| 国产精品蜜芽在线观看| 日本免费一区二区视频| 高潮在线视频| 欧美视频久久| 国产私拍福利精品视频二区| 精品久久久久久久久久久下田| 国产 日韩 欧美一区| 日本a口亚洲| 日本午夜免费一区二区| 久久成人综合| 国产精品观看| 久久av最新网址| 日韩av网站免费在线| 98精品久久久久久久| 日本成人手机在线| 91成人在线| 亚洲性视频h| 电影一区二区三区久久免费观看| 午夜宅男久久久| 嫩呦国产一区二区三区av | av中文在线资源库| 精品高清久久| 美女免费视频一区二区| 一本久道久久综合婷婷鲸鱼| 久久不见久久见免费视频7| 91欧美日韩| 天天躁日日躁狠狠躁欧美| 日本sm残虐另类| 视频一区二区三区在线| 亚洲成av人片在线观看www| 欧美一级做a| 宅男噜噜噜66一区二区| 久久九九精品视频| 国产精品资源| 性色一区二区三区| 精品国产欧美日韩| 欧美黄色一区| 国产免费拔擦拔擦8x在线播放 | 欧美成人一二区| 久久不射2019中文字幕| 高清欧美性猛交xxxx黑人猛| 日本aⅴ免费视频一区二区三区| 久久99国产精品二区高清软件| www.成人网| 日本在线观看不卡视频| 国产精品久久久久久久| 亚洲二区精品| 日韩精品中文字幕吗一区二区| 欧美一级播放| 两个人看的在线视频www|