I am having trouble writing a program to repeat this program. I want to ask them if they want to repeat (yes or no). If they say yes it repeats the whole program. This is what I have so far:
sentence=input("Please enter sentence(s)")
words = sentence.split()
number_of_words = len(words)
counter=0
for x in sentence:
if x in "!?.":
counter=counter+1
print("There is "+str(counter)+" sentences and " + str(number_of_words) + " words")