Answers for "is login a class in python"

0

is login a class in python

def Login(self):
    while True:
        username = raw_input('\nPlease log in by providing your user credentials \nUser Name :')

        if (username == users[0]['username'] or username == users[1]['username']):
            password = raw_input('Password : ')
            if (password == users[0]['password'] or password == users[1]['password']):
                print('Successfully logged in!')
                print (
                'Welcome,' + username + '! Please choose of the following options by entering the corresponding menu number.')
                global LoggedUserName
                LoggedUserName = username;
                return True;
                break;
            else:
                print('Your password is not correct. Please try again!')
        else:
            print ('Your username is not correct. Please try again!')
Posted by: Guest on October-12-2020
0

is login a class in python

class User:

def __init__(self,username,password,basket):
    self.username=username
    self.password=password
    self.basket=basket
Posted by: Guest on October-12-2020

Code answers related to "is login a class in python"

Python Answers by Framework

Browse Popular Code Answers by Language