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综合合色| 亚洲视频国产视频| 亚洲伦伦在线| 亚洲高清在线播放| 在线观看欧美视频| 国产日韩精品综合网站| 欧美日韩中文字幕在线视频| 麻豆成人小视频| 久久久久久亚洲精品不卡4k岛国| 亚洲综合第一页| 99精品热视频只有精品10| 在线日韩欧美| 亚洲电影有码| 亚洲国产欧美一区二区三区久久| 激情欧美一区二区三区| 国产精品视频免费观看| 欧美三区视频| 欧美激情国产高清| 欧美18av| 欧美激情一区二区在线 | 国产日韩综合一区二区性色av| 欧美片在线观看| 欧美日韩一区二区高清| 欧美日韩在线播放一区| 欧美香蕉视频| 国产精品视频999| 国产一区日韩二区欧美三区| 国产在线精品自拍| 亚洲电影免费| 艳妇臀荡乳欲伦亚洲一区| 制服丝袜亚洲播放| 亚洲一区二区三区视频| 亚洲欧美日韩电影| 久久国产精品免费一区| 久久夜色精品亚洲噜噜国产mv| 蜜臀av性久久久久蜜臀aⅴ| 欧美超级免费视 在线| 欧美精品在线观看一区二区| 国产精品第13页| 国产视频在线观看一区二区| 一区精品久久| 中文亚洲欧美| 久久精品视频网| 欧美激情按摩在线| 国产精品大片| 黑人一区二区| aa国产精品| 欧美在线综合| 欧美日韩午夜精品| 激情欧美亚洲| 亚洲无玛一区| 欧美r片在线| 国产欧美一区二区三区另类精品| 亚洲国产黄色| 欧美在线观看一区| 欧美日韩国产色视频| 国产自产高清不卡| 在线综合亚洲欧美在线视频| 久久精品网址| 国产精品视频一区二区三区| 一区二区三区在线免费视频| 亚洲一区激情| 欧美日韩高清在线| 激情五月综合色婷婷一区二区| 一区二区激情视频| 久久一区激情| 国内精品久久久久影院 日本资源 国内精品久久久久伊人av | 久久国产婷婷国产香蕉| 欧美日韩影院| 亚洲伦理一区| 欧美成人免费小视频| 国产一区二区日韩精品| 亚洲一区二区三区影院| 欧美久久久久久久久| 伊人色综合久久天天| 欧美在线国产精品| 国产精品欧美在线| 中国日韩欧美久久久久久久久| 免费一级欧美片在线播放| 国产女同一区二区| 亚洲欧美日本伦理| 国产精品黄色| 夜夜嗨av一区二区三区| 欧美激情综合在线| 亚洲精品美女久久7777777| 老司机凹凸av亚洲导航| 国内精品视频666| 亚洲新中文字幕| 欧美午夜宅男影院| 亚洲自拍偷拍色片视频| 国产精品乱码| 午夜精品视频在线| 国产色婷婷国产综合在线理论片a| 一本色道久久综合亚洲91| 欧美色道久久88综合亚洲精品| 一本色道久久综合| 国产精品理论片在线观看| 一区二区三区久久精品| 欧美日韩免费观看一区=区三区| 91久久精品一区| 美脚丝袜一区二区三区在线观看 | 精品av久久久久电影| 久久久一区二区| 亚洲人成精品久久久久| 欧美日韩亚洲免费| 午夜激情综合网| 原创国产精品91| 欧美日韩免费观看一区三区| 一区二区欧美在线观看| 国产酒店精品激情| 久久婷婷丁香| 一区二区三区精品视频| 国产一区二区精品在线观看| 久久亚洲综合网| 亚洲一区二区免费看| 国产综合久久久久影院| 欧美成人午夜剧场免费观看| 亚洲综合色激情五月| 黄色成人免费网站| 欧美视频一区二区三区| 久久久精品日韩欧美| 亚洲美女色禁图| 国产精品日韩二区| 欧美肥婆bbw| 欧美在线啊v| 99精品欧美一区二区三区| 国产日韩成人精品| 欧美日韩三区| 久久天天躁夜夜躁狠狠躁2022| 夜夜嗨一区二区| 激情成人亚洲| 国产乱码精品一区二区三区五月婷| 久久综合久色欧美综合狠狠| 亚洲深夜福利| 亚洲另类一区二区| 一区二区自拍| 国产亚洲a∨片在线观看| 欧美视频中文字幕| 欧美精品久久一区二区| 久久综合色婷婷| 午夜伦理片一区| 一区二区91| 亚洲人成在线播放| 亚洲韩日在线| 影音先锋在线一区| 国产在线视频欧美一区二区三区| 欧美日韩系列| 欧美精品97| 欧美巨乳在线| 欧美国产日韩视频| 欧美国产91| 欧美激情第五页| 欧美大尺度在线| 美女性感视频久久久| 久久久久久综合网天天| 欧美亚洲免费| 性一交一乱一区二区洋洋av| 亚洲一区二区在线免费观看| 99热精品在线| 亚洲私人黄色宅男| 亚洲综合久久久久| 亚洲一区欧美二区| 欧美亚洲三级| 久久久久久久久久久成人| 久久精品91久久久久久再现| 欧美制服丝袜第一页| 欧美一区二区三区免费观看| 久久国产天堂福利天堂| 久久精品国产清高在天天线| 久久九九免费视频| 老司机午夜精品视频| 欧美黄色小视频| 欧美视频在线看| 国产精品私房写真福利视频| 国产精品视频精品视频| 国产在线视频欧美| 亚洲二区视频在线| 亚洲蜜桃精久久久久久久| 亚洲一区二区免费视频| 久久成人羞羞网站| 欧美波霸影院| 欧美日韩一区二区三区| 国产亚洲欧美激情| 国产一区二区三区直播精品电影| 国语精品中文字幕| 在线日本欧美| 亚洲一区二区成人| 久久久精品五月天| 欧美激情亚洲综合一区| 国产精品美女www爽爽爽| 国内精品视频一区| 中日韩美女免费视频网址在线观看 | 国产精品久久久久婷婷| 韩国av一区二区三区| 日韩午夜在线播放|