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

Member Avatar for leegeorg07

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.

Member Avatar for sravan953

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")
Member Avatar for leegeorg07

@sravan hey, i think that cohen is probably using python3.1 but for versions previous to python3 yours would work better

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.