subject

Can you explain this code
sentence= input(" enter a sentence with no puncatuation: > ")
sentence= sentence. lower()
keyword= input(" input a word from the sentence: > ")
keyword= keyword. lower()
words= sentence. split(' ')
for (i, subword) in enumerate(words):
if(subword == keyword):
print(i+1)
break
else:
print("error this word isnt in the sentence")

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
What is the process in which the software development team compiles information to determine the final product.
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
1. which of the following is not an example of an objective question? a. multiple choice. b. essay. c. true/false. d. matching 2. why is it important to recognize the key word in the essay question? a. it will provide the answer to the essay. b. it will show you a friend's answer. c. it will provide you time to look for the answer. d. it will guide you on which kind of answer is required.
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
You draw two cards from a standard deck of 52 cards, but before you draw the second card, you put the first one back and reshuffle the deck. (a) are the outcomes on the two cards independent? why?
Answers: 3
You know the right answer?
Can you explain this code
sentence= input(" enter a sentence with no puncatuation: > ")<...
Questions
question
Mathematics, 14.01.2020 09:31
Questions on the website: 13722360