まず、すみません。私はプログラミングとAndroidデバイスでのプログラミングの両方に慣れていませんが、何らかの理由でこのコードをコンパイルしてPython For Androidを使用して実行すると. このエラーを返し続けます:
ファイル "/storage/emulated/programming/pass.py"、4 行目、
ユーザー名 = input("Username: ") File""、1 行目、NameError: name 'user' が定義されていません
security = 0
username = ""
while not username:
username = input("username: ")
password = ""
while not password:
password = input("password: ")
if username == "user" and password == "pass":
security = 5
print (" Hello, security level is:" , security)
else:
print("invalid login")
これと同じコードを PC で実行しても、このエラーは発生しません。Python For Android と Droidedit を使用して Python コードを書くことに慣れている人はいますか? 利用可能なすべてのモジュールをインストールしました。