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
onalenna.bobeilwe
0
Newbie Poster
Recommended Answers
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
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.