Categories
Uncategorized

What’s your name? – Python

Another useless bit of code

#!/usr/bin/python
# myName.py

myName=raw_input("What is your name?\n")

if myName=="jose" or myName=="Jose":
	print "yeah, cool. I know you."
else:
	print myName+"? Who the f**k are you?\nI don't know no f***ing",myName+"."

If you answer “jose” or “Jose”, you get

$ python myName.py
What is your name?
Jose
yeah, cool. I know you.

But if you enter anything else, you get this…

$ python myName.py
What is your name?
Loretta
Loretta? Who the f**k are you?
I don't know no f***ing Loretta.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s