Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/344.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
这有什么问题?(Python)_Python_Python 3.x - Fatal编程技术网

这有什么问题?(Python)

这有什么问题?(Python),python,python-3.x,Python,Python 3.x,有人能解释一下为什么这样不行吗? 上面说 您已将变量定义为PassSwarm并将其作为密码访问 这里 请不要使用密码。剑不是密码 print ("*Default*") loop = 'true' while(loop == 'true'): username = input("Username Please : ") passsword = input("Password Please : ") if(username == "Default

有人能解释一下为什么这样不行吗? 上面说


您已将变量定义为PassSwarm并将其作为密码访问

这里

请不要使用密码。剑不是密码

    print ("*Default*")
    loop = 'true'
    while(loop == 'true'):
    username = input("Username Please  : ")
    passsword = input("Password Please  : ")
    if(username == "Default" and password == "Default2"):
    print ('Logged in Successfully as ') + username
    loop = 'false'
    loop1 = 'true'
    while(loop1 == 'true'):
        command = input(username + "{} > >")
        if(command == "exit" or command == "Exit"):
            break
        else:
            print ("'") + command + "' is not a valid command!"
    else:
        print ('Invalid Credentials!')
line 6, in <module>
    if(username == "Default" and password == "Default2"):
NameError: name 'password' is not defined
passsword = input("Password Please  : ")
if(username == "Default" and password == "Default2"):