2020-08-13 12:00:20 +02:00
|
|
|
|
---
|
|
|
|
|
id: 5e46f8d6ac417301a38fb92d
|
2021-07-15 13:04:11 +05:30
|
|
|
|
title: 剪刀石头布
|
2020-08-13 12:00:20 +02:00
|
|
|
|
challengeType: 10
|
2021-07-15 13:04:11 +05:30
|
|
|
|
forumTopicId: 462376
|
2021-01-13 03:31:00 +01:00
|
|
|
|
dashedName: rock-paper-scissors
|
2020-08-13 12:00:20 +02:00
|
|
|
|
---
|
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --description--
|
|
|
|
|
|
2021-07-15 13:04:11 +05:30
|
|
|
|
在这个挑战中,你将创建一个程序来玩石头、剪刀、布。 一个随机选取的程序通常会有 50% 的时间获胜。 要通过这一挑战,你的程序必须与四个不同的机器人进行对战,并达到至少 60% 胜率。
|
2020-08-13 12:00:20 +02:00
|
|
|
|
|
2021-07-15 13:04:11 +05:30
|
|
|
|
你可以访问 [Replit 上的完整项目描述和启动代码](https://replit.com/github/freeCodeCamp/boilerplate-rock-paper-scissors)。
|
2020-08-13 12:00:20 +02:00
|
|
|
|
|
2021-07-15 13:04:11 +05:30
|
|
|
|
进入该链接后,fork 该项目。 一旦你根据 “README.md” 中的说明完成了项目,请在下面提交你的项目链接。
|
2020-08-13 12:00:20 +02:00
|
|
|
|
|
2021-07-15 13:04:11 +05:30
|
|
|
|
我们仍在开发机器学习课程的交互式课程部分。 现在,你需要使用其他资源来学习如何通过这一挑战。
|
2020-08-13 12:00:20 +02:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --hints--
|
2020-08-13 12:00:20 +02:00
|
|
|
|
|
2021-07-15 13:04:11 +05:30
|
|
|
|
它应该通过所有的 Python 测试。
|
2020-08-13 12:00:20 +02:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
```js
|
2020-08-13 12:00:20 +02:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --solutions--
|
2020-08-13 12:00:20 +02:00
|
|
|
|
|
2021-01-13 03:31:00 +01:00
|
|
|
|
```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.
|
|
|
|
|
```
|