Compter Science ASAP please

How do you check if the words exist in the sentence in Python?

So far I have got...

the_sentence = ("I love chocolate and chocolate loves me")
sentence = the_sentence.split()
sentence_1 = raw_input("Enter a word")
def "word":
if word in the_sentence:
print "Yes"
elif word not in the_sentence:
print "Nope"


  1. 👍 0
  2. 👎 0
  3. 👁 50
asked by Reece

Respond to this Question

First Name

Your Response

Similar Questions

  1. Language Arts (CHECK ANSWERS)

    1. You already know that Anansi is a trickster. What does this tell you about the outcome of the folktale? (1 point) A: Everything will turn out the best possible way for all the characters. B: Everything will turn out the best

    asked by Daisy on May 28, 2014
  2. math

    There are 7 children who are 5ft long,their total length is 3ft longer than a full grown python. How long can the python be?

    asked by Birungi on September 25, 2007
  3. Literature

    I am suppose to compare/contrast Monty Python and the Holy Grail with the story of King Arthur. I did not see the Monty Python movie. Can anyone tell me where I might find some information on it. Thank you

    asked by Anonymous on November 25, 2008
  4. Language arts

    Can someone give me an example of a metaphor? Is a mouse in front of the yawning maw of a python, a metaphor? Sorry, I wrote the question wrong.!!! ---------------------------------------------------- Is He's paralyzed, a mouse in

    asked by vivian on September 5, 2006
  5. Computer science

    Write a function in Python: Given a list of words, indicate whetehr the list constitutes a "Word Ladder." A Word Ladder is a series of words where each succesding word changes by only one letter. You may assume that all words will

    asked by Victoria on May 28, 2010
  6. english

    I need to write a sentence using the words: fingernails,trees, when,fill,for,homework.The words HAVE to stay in th same order,and you can't change thier tenses. Also a sentence with these words in this

    asked by amy on March 10, 2010
  7. Computer Science JAVA FUNCTIONS

    Write a Function You will be given one of the following problems to solve using and writing Python functions. Given a list of words, return an array which indicates the frequency that each letter occurs. For example, in the list

    asked by Ben on May 31, 2010
  8. vocab

    Hello. I have got homework and I need help. Could you help me, please? Here are questions: =========== Complete the sentence with words to describe the taste of food: "There aren't many spices in this. It's very ........" Complete

    asked by Milan K. on February 23, 2008
  9. Sentences,fragments,run ons

    I have answered each group of words and would like someone to check them please. I just want to know I am on the right track, and understand this. Identify whether each group of words is a complete sentence, fragment, or a run-on.

    asked by Jazmyne on September 4, 2012
  10. English

    Here are some sentences on the same theme I'd like you to check. I included a few sentences on reading habits and a few words I don't know if they exist. 1) Is the verb "punch" correct in the sentence: Punch your ticket (check),

    asked by Henry2 on October 3, 2011

More Similar Questions