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
The physical components of a computer are called what?
Natalka [10]

Answer:

the hardware components.

Explanation:

the hardware components are the physical parts of the computer which can be seen and touched.

3 0
3 years ago
Essay:
nirvana33 [79]

Answer:

1) There are three ingredients needed to access the Internet from a laptop or desktop computer: (1) an ISP, (2) a modem and (3) a Web browser.

2) yeah ofcourse social media ia a very helpful tool for people because it helps us connect with people all around the globe.It helps you clear you doubts for the perfect example is now.You know you are clearing your doubt here in brainly which can be considered as a social media.

8 0
3 years ago
What are the<br>advontages of social medio?​
MrMuchimi

Answer: some advantages are making sure you’re informed about things going on in the world and connecting with you’re friends or even talking to family members. I hope this answered you’re question!

Explanation:

6 0
3 years ago
Which of the following is true about file formats?
statuscvo [17]

Answer:

A

Explanation:

The answer is A mate, if you need any help let me know please

3 0
3 years ago
Read 2 more answers
A location in memory used for storing data and given a name in a computer program is called a
Vladimir79 [104]
Variable

-------------------------------------
8 0
4 years ago
Other questions:
  • Consider a load-balancing algorithm that ensures that each queue has approximately the same number of threads, independent of pr
    14·1 answer
  • Anna is looking for a job. Which two types of skills would she find necessary to secure a job?
    10·1 answer
  • The united states attempted to halt the communist revolution in cuba by​
    7·1 answer
  • Which of the following statements is false? People tend to shortcut security procedures because the procedures are inconvenient.
    13·1 answer
  • Which of the following commands would you use to start the program Main with four strings? a. java Main arg0 arg1 arg2 arg3 b. j
    11·1 answer
  • Use C++:
    9·1 answer
  • do you think that some people have difficulty talking to others face to face because of how prevalent texting is today
    15·2 answers
  • Write a function called add_tuples that takes three tuples, each with two values, and returns a single tuple with two values con
    7·1 answer
  • what is the term for software that is exclusively controlled by a company, and cannot be used or modified without permission?
    6·1 answer
  • Which protocol is often used in conjunction with ipsec to provide a remote access client vpn with user authentication?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!