randint() missing 1 required positional argument: 'b'
时间: 2023-10-25 14:10:18 浏览: 257
的方法自己编写-疯狂物联 跨阵m1物联网开关原理图
这个问题是由于在调用randint()函数时缺少了一个必需的参数'b'导致的。在引用中,如果我们只传递了一个参数给my_sum()函数,就会出现类似的错误。在这种情况下,可以通过为缺少的参数提供一个默认值来解决这个问题。在randint()函数中,缺失的参数应该是一个区间的上界,因此我们可以尝试将其添加到函数调用中并提供一个适当的值来解决这个错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Python基础-Day2](https://blog.csdn.net/Fatalaf/article/details/126249728)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [TypeError: start_game() missing 1 required positional argument: ‘self’](https://blog.csdn.net/m0_62091240/article/details/128370264)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文