2021-05-05 10:13:49 -07:00
|
|
|
|
---
|
|
|
|
|
id: 5e46f8d6ac417301a38fb92d
|
2021-07-16 11:03:16 +05:30
|
|
|
|
title: 剪刀石頭布
|
2021-05-05 10:13:49 -07:00
|
|
|
|
challengeType: 10
|
2021-07-16 11:03:16 +05:30
|
|
|
|
forumTopicId: 462376
|
2021-05-05 10:13:49 -07:00
|
|
|
|
dashedName: rock-paper-scissors
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
|
2021-07-16 11:03:16 +05:30
|
|
|
|
在這個挑戰中,你將創建一個程序來玩石頭、剪刀、布。 一個隨機選取的程序通常會有 50% 的時間獲勝。 要通過這一挑戰,你的程序必須與四個不同的機器人進行對戰,並達到至少 60% 勝率。
|
2021-05-05 10:13:49 -07:00
|
|
|
|
|
2021-07-16 11:03:16 +05:30
|
|
|
|
你可以訪問 [Replit 上的完整項目描述和啓動代碼](https://replit.com/github/freeCodeCamp/boilerplate-rock-paper-scissors)。
|
2021-05-05 10:13:49 -07:00
|
|
|
|
|
2021-07-16 11:03:16 +05:30
|
|
|
|
進入該鏈接後,fork 該項目。 一旦你根據 “README.md” 中的說明完成了項目,請在下面提交你的項目鏈接。
|
2021-05-05 10:13:49 -07:00
|
|
|
|
|
2021-07-16 11:03:16 +05:30
|
|
|
|
我們仍在開發機器學習課程的交互式課程部分。 現在,你需要使用其他資源來學習如何通過這一挑戰。
|
2021-05-05 10:13:49 -07:00
|
|
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
|
2021-07-16 11:03:16 +05:30
|
|
|
|
它應該通過所有的 Python 測試。
|
2021-05-05 10:13:49 -07:00
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --solutions--
|
|
|
|
|
|
|
|
|
|
```py
|
|
|
|
|
# Python challenges don't need solutions,
|
|
|
|
|
# because they would need to be tested against a full working project.
|
|
|
|
|
# Please check our contributing guidelines to learn more.
|
|
|
|
|
```
|