第 9 步:我们需要在 for 循环中使用 if 语句来测试用户是否猜对了数字!
- 单击逻辑,转到并拖出if 。在for循环内将其缩进一次。
- 将测试变量从choice更改为guess ,将测试值从"yes"更改为rand_num 。
- 单击图形和.将Say if 语句中并将其分配给computer 。
.say()必须缩进两次,因为它在循环和if 语句中! ········ 应该先展示吧!
To navigate the page using the TAB key, first press ESC to exit the code editor.