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
Rewrite the area.py program (shown below, or in the Creating Functions section of the tutorial) so that it has separate functions for the perimeter and area of a square, a rectangl

#Why can''t I cd my Desktop? A minute ago I would open up cmd and it starts in C:\Users\myname but now it''s starting in C:\WINDOWS\system> and I don''t where I am or how to get ou

Procedures as first-class objects In Python, unlike  many  other  languages, methods are behave in much  the same way as num­ bers:  they  can be stored as values  of variable

Suppose the cover price of a book is $24.95, but bookstores get a 40% discount. Shipping costs $3 for the first copy and 75 cents for each additional copy. What is the tota

what is python

how to calculate standard deviations in programming

List mutation and shared structure Lists are mutable data  structures, which defines  that  we can actually modifies  the values  stored in their components. We do this by usi

For and While   If we want  to do some operation or set of operations various  times, we can handle the process  in several  different types.  The most straightforward types

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

What if you had a list of integer values, and you need to add  them  up and give the sum?  Here are a number of different types of doing  it. First,  here  is a type in a style