develop a program which asks for a name and a password,and prints an acceptance message if the name is "aladdin" and the password is "sesane".the program should print a reject message in all other cases.this should be achived by combining the two tests into one using the "and"key word
Jump to Post
#! /usr/bin/env python def verify(username, password): if username == "aladdin" and password == "sesane": return True else: return False username = raw_input("Enter username: ") password = raw_input("Enter password: ") result = verify(username, password) if result: pass else: print("Invalid input.")
Although it could probably be done much …
All 3 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.