セクション 2. 章 2
single
Challenge: Translation
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
Translate a polygon by a given vector.
Given a polygon represented as a list of (x, y) tuples and a translation vector (dx, dy), create a new list of tuples representing the translated polygon.
- For each point in
polygon, addvector[0]to the x-coordinate andvector[1]to the y-coordinate. - Return a new list containing all the translated points.
- The function must not modify the original
polygonlist.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 2. 章 2
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください