I need help with a task:
For example, given the input:
doubloons
your program should output:
Yarrrrrrr
I don't know how to do the python script. I have never done Python before.
Cohen
I need help with a task:
For example, given the input:
doubloons
your program should output:
Yarrrrrrr
I don't know how to do the python script. I have never done Python before.
Cohen
i would say to use:
a=input=("")
if a=="doubloons":
print("Yarrrrrrr")
Personally i think instead of using the above code you should try make it yourself by learning python
http://docs.python.org/tutorial/
Its really not that hard, and your tasks are only going to get harder.
Python is the easiest and most powerful language around! You should really make an attempt to start learning it! :)
Anyways:
s=raw_input("Please enter a word/sentence: ")
if(s=="doubloons"):
print("Yarrrrrrr")
@sravan hey, i think that cohen is probably using python3.1 but for versions previous to python3 yours would work better
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.