+ 1
import csv f = open('/storage/emulated/0/Python Program/pswd/psd.csv') data = csv.reader(f) check_password = 1 check_userid = 1
what is the decode error in the program file is created at the given location it contains data as follows vaibhav,123
3 Antworten
+ 2
Is this the complete code, or is this just a snippet?
0
complete code
0
complete code is
import csv
f = open('/storage/emulated/0/Python Program/pswd/psd.csv')
data = csv.reader(f)
check_password = 1
check_userid = 1
userid = input('Enter your id ; ')
for i in data:
if i[0] == userid:
check_userid = 0
userpassword = input('Enter password : ')
if i[1] == userpassword:
check_password = 0
print(f('Hey {userid} you are Authirised\n You can acess this file'))
break
f.close()
if check_userid == 1:
print('Incorrect User Id')
elif check_password == 1:
print('Incorrect Password')
else:
print("Hello World")