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
Tuples  and strings Python has two different more list-like data  types  that are very important to understand.A tuple  is a structure that  is like a list, but  is not  mutab

Expressions and assignment We can think of most computer programs as performing some sort of transformation on data.  Our code may get as input the exam scores of everyone in

how to make a python programme for van der waals equation of state with surface discontinouty

#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

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

how to use re.sub to seperate distint words and phrases when translating text from English to Spanish or vis versa in python programming

Worked example 1   Let's examine what  happens when  we compute the following Python code:   def p(x, y): z = x*x - y return z + 1/z   >>> p(1.0, 2.0) -2.0

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

A program to count how many files are on the file system which displays summary information regarding the total number of bytes used by all files and a breakdown of the number of b

Assume you have a truck which has to travel across a desert from the base camp at position 0 (left) to the target camp at position 4 (right). The intermediate positions 1,2, and 3