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

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

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

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

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

          老司机一区二区三区| 国产精品福利av| 亚洲欧美www| 国产精品久久激情| 久久综合综合久久综合| 亚洲综合精品自拍| 99视频日韩| 亚洲娇小video精品| 国产乱码精品| 国产精品系列在线| 欧美日韩情趣电影| 欧美ab在线视频| 久久综合中文字幕| 亚洲乱码国产乱码精品精98午夜 | 欧美影院午夜播放| 亚洲精品一级| 亚洲福利专区| 亚洲成色777777在线观看影院| 国产精品日韩高清| 国产精品久久久久久户外露出| 欧美激情欧美激情在线五月| 欧美/亚洲一区| 免费久久99精品国产| 久久综合导航| 免费视频一区| 欧美精品一区二区三区久久久竹菊| 葵司免费一区二区三区四区五区| 久久久不卡网国产精品一区| 久久精品亚洲精品国产欧美kt∨| 午夜精品在线观看| 欧美日韩在线不卡一区| 欧美日韩综合视频| 久久中文字幕一区| 免费在线观看一区二区| 欧美—级a级欧美特级ar全黄| 欧美精品激情在线| 欧美午夜三级| 国产日韩精品一区二区| 好看的日韩av电影| 亚洲欧洲精品天堂一级| 99av国产精品欲麻豆| 亚洲午夜未删减在线观看| 午夜精品999| 久久午夜电影| 欧美日韩国产美女| 国产欧美日韩综合| 亚洲国产精品电影| 亚洲一区二区三区在线视频| 亚洲欧美中文在线视频| 久久免费精品日本久久中文字幕| 噜噜噜噜噜久久久久久91 | 国产一区二区丝袜高跟鞋图片 | 在线不卡欧美| 99精品欧美一区二区蜜桃免费| 亚洲资源在线观看| 狼人社综合社区| 国产精品国产精品| 在线免费高清一区二区三区| 99精品99| 米奇777在线欧美播放| 欧美小视频在线观看| 激情综合亚洲| 亚洲天堂网在线观看| 免费观看成人www动漫视频| 欧美激情日韩| 国产精品成人一区二区艾草| 国模私拍一区二区三区| 99国产精品国产精品久久| 欧美一区成人| 国产精品久久久久久亚洲毛片| 亚洲大片免费看| 久久福利影视| 国产精品日韩欧美一区二区| 亚洲激情在线播放| 久久精视频免费在线久久完整在线看 | 欧美在线观看一区| 欧美日韩在线一区二区| 亚洲高清不卡一区| 欧美伊久线香蕉线新在线| 欧美日韩午夜| 亚洲日韩第九十九页| 美日韩精品视频| 激情综合色综合久久| 亚洲专区一二三| 欧美日韩www| 最新中文字幕亚洲| 久久全球大尺度高清视频| 国产欧美日韩在线播放| 亚洲欧美怡红院| 欧美大色视频| 亚洲欧美综合v| 欧美精品一区二区三区蜜臀| 激情婷婷久久| 久久亚洲国产成人| 在线免费一区三区| 欧美v日韩v国产v| 亚洲毛片在线观看| 欧美粗暴jizz性欧美20| 亚洲国内欧美| 欧美全黄视频| 亚洲天堂男人| 国产日韩欧美在线一区| 欧美亚洲综合久久| 母乳一区在线观看| 亚洲欧洲一二三| 欧美午夜a级限制福利片| 亚洲视频在线看| 国产麻豆综合| 裸体一区二区三区| 91久久精品一区| 国产精品第十页| 欧美一区二区在线观看| 久久手机免费观看| 亚洲视频在线观看| 99国产精品视频免费观看一公开| 你懂的国产精品| 日韩一区二区精品在线观看| 欧美视频中文在线看| 欧美一区二区视频免费观看| 国产精品jizz在线观看美国| 午夜精品国产| 亚洲国产成人久久| 国产精品r级在线| 久久米奇亚洲| 日韩一级大片| 国产亚洲精品自拍| 欧美日韩国产欧美日美国产精品| 亚洲综合国产| 亚洲人永久免费| 国产视频欧美| 欧美日韩亚洲一区二区三区| 欧美有码在线观看视频| 亚洲精品综合| 国产在线乱码一区二区三区| 欧美伦理在线观看| 久久国产精品99国产| 国产精品美女主播在线观看纯欲| 毛片一区二区三区| 亚洲免费成人av| 国产精品午夜在线观看| 久久综合中文色婷婷| 亚洲一区日本| 亚洲精品久久久久久下一站| 国产精品视频福利| 欧美欧美在线| 欧美大片va欧美在线播放| 久久激情五月激情| 亚洲欧美日韩一区二区在线| 亚洲精品中文字幕女同| 国内伊人久久久久久网站视频| 欧美日韩一区二区视频在线观看| 久久久久久久综合色一本| 欧美亚洲一区三区| 亚洲淫片在线视频| 一区二区三区回区在观看免费视频| 136国产福利精品导航网址| 国产亚洲精品bt天堂精选| 国产精品一区二区三区四区| 欧美色图一区二区三区| 欧美美女操人视频| 欧美激情中文字幕一区二区| 亚洲理伦电影| 欧美成人免费在线观看| 亚洲精品在线免费观看视频| 国产精品国产三级国产aⅴ入口 | 中文高清一区| 亚洲视频自拍偷拍| 亚洲在线视频| 欧美中文字幕在线视频| 亚洲资源av| 亚洲一区二区三区高清 | 国产精品国内视频| 国产精品美女久久久久av超清 | 国产伦精品一区二区三区| 亚洲欧美在线x视频| 亚洲一区二区三区在线| 亚洲欧美一区二区精品久久久| 一区二区三区你懂的| 夜夜嗨av一区二区三区四区| 国产精品你懂的| 久久久精品一区二区三区| 久久欧美中文字幕| 免费亚洲网站| 国产精品啊啊啊| 国产婷婷成人久久av免费高清| 韩国av一区二区三区四区| 91久久亚洲| 亚洲一区二区三区777| 香蕉免费一区二区三区在线观看 | 欧美日韩不卡视频| 国产精品日产欧美久久久久| 国产一区二区三区在线观看网站 | 欧美日本在线| 国产亚洲成精品久久| 91久久精品一区二区别| 亚洲欧美日本精品| 久久综合久久综合久久综合| 久久久噜噜噜久久狠狠50岁| 午夜精品久久久久久久99水蜜桃| 野花国产精品入口|