Program requests password to display information of author, Python Programming

Write a program that requests a password after the author/program information is displayed. Make the password "hello". The program should then ask the user for their name: if the name entered is the same as your name, the program should respond with "What a great name!"; if they enter "Madonna" or "Cher", the program should respond "May I have your autograph, please?". For any other input, the program should respond with "(input name), that's a nice name".

SAMPLE OUTPUT (including author/program information)

Program author: Barney Rubble
ID#: 1234567
Program 3-LOOPS AND IF CONDITIONS
Password? unicorn
Password? opus
Password? hello
Welcome to the second half of the program!
What is your name? Barney
What a great name!

ALTERNATE OUTPUTS

What is your name? Cher
May I have your autograph, please?

What is your name? Bill
Bill, that's a nice name.

 

Posted Date: 3/21/2013 3:17:41 AM | Location : United States







Related Discussions:- Program requests password to display information of author, Assignment Help, Ask Question on Program requests password to display information of author, Get Answer, Expert's Help, Program requests password to display information of author Discussions

Write discussion on Program requests password to display information of author
Your posts are moderated
Related Questions
Task This problem creates a list containing names. The list of names will be printed, sorted, printed again in the new sorted order, written to a new output file, and searched. Ca

Depending on your  previous programming background, we use different sides  through the available readings:   If you have never programmed before: you should start with a

Variables We cannot  go very far without variables. A variable is a value related to a name that we can bind  to have a particular value  and  then  later use in an expression.


Perimeter of a polygon Now, let's consider the problem of computing the length  of the perimeter of a polygon. The input is a structure of vertices,  encoded as a list of list

We encourage you to adopt an interactive style of debugging and programming. Use the Python shell a lot. Write short pieces of code and check them.  It is much  simpler to test the

from urllib2 import urlopen # Open http://placekitten.com/ for reading on line 4! response = kittens.read() body = response[559:1000] # Add your ''print'' statement here!

Booleans   Before we talk about  conditionals, we require  to clarify the Boolean  data  type.  It has two values False and True. Typical statement that have Boolean values

from urllib2 import urlopen var= ('' response">http://placekitten.com'') response = kittens.read(body) body = response[559:1000] print ''Kittens:'', response

how do you make an if and else statment work in pytho?