1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Amiraneli [1.4K]
3 years ago
6

Please use Python 3 to solve the following problem. Please also show all outputs and share code.The variable sentence stores a s

tring. Write code to determine how many words in sentence start and end with the same letter, including one-letter words. Store the result in the variable same_letter_count.Hard-coded answers will receive no credit.sentence = "students flock to the arb for a variety of outdoor activities such as jogging and picnicking"
Computers and Technology
1 answer:
Harman [31]3 years ago
5 0

Answer:

The code is given in Python below with its output.

Explanation:

"""

User is asked to enter the input in sentence

"""

sentence=input("Enter the sentence :")

"""

sentence is converted to list named words

"""

words=sentence.split()

same_letter_count=0

"""

In for loop we access each word

and check character at index 0 and at last index

is same or not.

"""

for word in words:

 if word[0] == word[len(word)-1]:

   same_letter_count+=1

 

print("The same letter count is",same_letter_count)

<u>OUTPUT:: </u>

TEST CASE 1::

Enter the sentence :students flock to the arb for a variety ofoutdoor activities such as jogging and picknicking

The same letter count is 2

TEST CASE 2::

Enter the sentence :i am a bit madam

The same letter count is 3

You might be interested in
With a patent on drug Z27, why would Able Drug Company charge customers $7 per 100 units even though its cost of producing 100 u
garik1379 [7]
The Able Drug Company does that to make a beneficial profit, because if they sold it for what it was worth then they would not make any money.
4 0
3 years ago
Read 2 more answers
Select the correct answer.
SpyIntel [72]

Answer:

i think real time fluid dynamics

Explanation:

3 0
3 years ago
What output is displayed when the code that follows is executed? HashMap sales = new HashMap&lt;&gt;(); sales.put("January", 389
White raven [17]

Answer:

March: 275.30

January: 389.45

February: 432.89

Explanation:

The code to be executed is a Java code. Since the For loop used is based on Sale, when the code is complied it will print the output in the order of sale as below:

March: 275.30

January: 389.45

February: 432.89

8 0
3 years ago
Which software programs should students avoid using to create and submit course work? (Choose all that apply). Word, Pages, Numb
Aleksandr [31]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

You can submit your course work most often in a Word document. Because in the word document, you can insert text, numbers, images, charts whatever you want such as required for writing a book- easily.

The correct options to this question, that you should need to avoid using to create and submit course work are pages, numbers, and keynote.

Because while submitting the course work, you need to submit a complete word document, it is not required to you that you have to submit numbers, pages, or keynotes along with the course assignment. You can create a course assignment or project document in word and submit to your respective teacher. However, you can not create your course work using keynotes or pages, etc as given in the question.

3 0
3 years ago
Which of these is not a type of socket?/computer wise
d1i1m1o1n [39]

Many sockets have existed throughout history but only three are relevant today. These are LGA, PGA and BGA.

8 0
3 years ago
Other questions:
  • A benefit of IPsec is __________.
    8·1 answer
  • Microsoft Xbox operating system provides Xbox programmers with a set of common standards to use to access controllers, the Kinec
    6·1 answer
  • A _____ is a unique name that identifies an Internet site. URL Browser AOL IA
    13·1 answer
  • Suppose a MATV/SMATV (Satellite Master Antenna Television) firm has to start it's operation in the metropolitan area of a countr
    12·1 answer
  • ____________ is a script or a tool that obtains privileges of a root
    8·1 answer
  • According to the government, employees have a right to understand the risks associated with the materials they work with.
    15·1 answer
  • Information about hardware engineers?
    9·1 answer
  • Which of the following are causes of a run-time error. Choose all that apply.
    13·1 answer
  • I dont uderstand dis my teacher no helping pls help me i need to understand TEch
    10·1 answer
  • Assume the name of your data frame is flavors_df. What code chunk lets you review the structure of the data frame?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!