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
goldfiish [28.3K]
3 years ago
13

The variable sentence stores a string. Write code to determine how many words in sentence start and end with the same letter, in

cluding one-letter words. Store the result in the variable same_letter_count.
Computers and Technology
1 answer:
irina [24]3 years ago
4 0

Answer:

sentence = "hello wow a stores good"

same_letter_count = 0

sentence_list = sentence.split()

for s in sentence_list:

   if s[0] == s[-1]:

       same_letter_count += 1

print(same_letter_count)

Explanation:

*The code is in Python.

Initialize the sentence with a string

Initialize the same_letter_count as 0

Split the sentence using split method and set it to the sentence_list

Create a for loop that iterates through the sentence_list. If the first and last of the letters of a string are same, increment the same_letter_count by 1

When the loop is done, print the same_letter_count

You might be interested in
25 points select 3 options!!!!!!!!!!!!!!!!!!!!!!!!!
STALIN [3.7K]
A, B , and E sorry if I’m wrong
4 0
2 years ago
Gathering information with your eyes is called
Ivahew [28]
Observing, Looking, Collecting, there are a few words for "gathering information with your eyes". 
4 0
3 years ago
Read 2 more answers
HELPPP!!! ASAP *What are the purposes of a good web page?*
Brrunno [24]

I would say functional and straightforward

4 0
3 years ago
Which of the following best describes a server?
Lady_Fox [76]

Answer:

number 4

Explanation:

7 0
2 years ago
Read 2 more answers
How to improve and create beautiful graphic
kaheart [24]

Answer:

Learn OpenGL and any graphics rendering program.

Explanation:

3 0
3 years ago
Other questions:
  • Can a percent be used in a filename?
    13·1 answer
  • True or False? Most operating systems allow the user to specify a set of paths that are searched in a specific order to help res
    5·1 answer
  • Graphic design includes typefaces, page layouts, corporate logos, and product packaging. Which modern graphic designer is best k
    14·2 answers
  • one data is in memory the computer interpets and executeinstructions to process the data into informationA. TrueB. False
    8·1 answer
  • What is one way to recognize whether an online source has been copyrighted? The source features the phrase “all rights reserved.
    6·2 answers
  • How to interchange first half of the array with second half of array in python?
    9·1 answer
  • For this scenario related to turtle drawing, indicate whether it is better to write a loop or a function (or a set of functions)
    13·1 answer
  • Which of the following types of computers is typically used by governments and hospitals and can support hundreds of users?
    6·2 answers
  • compare a 4 core processor 1.3ghz 8 megabytes 16ram and 2 terabyte hard drive to a 2 core 3.9 ghz 2 megabyte cache 4gb ram and 2
    5·1 answer
  • List six features of the Microsoft ​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!