中级
实现支付密码验证错误次数锁定
未完成
中级参考
代码结构已给出,请填写 ____ 处
def solve():
from pyodide.http import open_url
account_types_csv = open_url(____).read()
payment_channels_csv = open_url(____).read()
transfer_types_csv = open_url(____).read()
transaction_limits_csv = open_url(____).read()
accounts_csv = open_url(____).read()
transfers_csv = open_url(____).read()
amount_reservations_csv = open_url(____).read()
fraud_rules_csv = open_url(____).read()
attempts, max_attempts, correct, locked = ____, ____, '____', False
inputs = ['____', '____', '____', '____']
for pwd in inputs:
if locked:
print(____)
continue
if pwd == correct:
print(____)
attempts = ____
else:
attempts += ____
if attempts >= max_attempts:
locked = True
print(____)
else:
print(____)
示例
输入
solve()
期望输出
密码: wrong1 结果: FAIL (剩余2次) 密码: wrong2 结果: FAIL (剩余1次) 密码: 123456 结果: PASS 密码: wrong3 结果: FAIL (剩余2次)
👑
升级 VIP
解锁全部题目,畅通无阻地学习
- ✓ 解锁全部训练包所有题目
- ✓ 查看完整参考代码和提示
- ✓ 浏览器内直接运行 Python 代码
- ✓ 自动批改 + 进度追踪
30天
¥18
1年
¥99
2年
¥158
3年
¥199