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
Mrs. Zoo gave out the rubric for our essay. She stated that our essay should be complete by Friday of that week. I didn't have t
Rom4ik [11]

Answer:

No

Explanation:

You had the whole week for the essay but didn't do it and then turned it in late.

6 0
3 years ago
What is the answer ??​
Natali5045456 [20]

<em>=</em><em> </em><em>Option</em><em> </em><em>b</em><em> </em><em>Minicomputer ..........</em>

3 0
2 years ago
Read 2 more answers
Develop a script to demonstrate an understanding of the overload (overwrite) methods of using Python operators. This lesson will
MrRa [10]

hsjshekejeoehejeoejebenwkwuwbnwlwjdvrbrnfnfjkddjddmdmdndnfndmdkdjdjdjdjjdjdjdjdkdkdkdkdfkkdjdjdjdyremssjyehsmmamaajbshsjsbdbsksidhdbdbddddddddododododkdkdkdjdjdhddhhdvxbxbbxbxbxjdiegebeodhe

8 0
3 years ago
The faster an object is moving, the ________ the shutter speed needs to be in order to freeze motion.
statuscvo [17]

Answer:

jkdsdjdshj,dfh.jhdfbhjf

Explanation:

bchSDCMHCXZ NHCXHBDSVCHDH,KC NBDBSDMJCBDBFD,JHCDSMNBBNCSCBFDNJCFJKC FMNSDNMSDFCH ĐS,CJDBS,CBSJBV,FJNDBFDSFDVBFĐDVFBVJFDCDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDHCD

5 0
3 years ago
Read 2 more answers
Kyla, a business analyst uses test scripts while testing an application before it is released to the client. Why do business ana
Mariana [72]

Answer:

D. to create a test environment

Explanation:

After releasing it will be "production"

8 0
3 years ago
Other questions:
  • In an ha configuration, which two failure detection methods rely on icmp ping? (choose two.)
    12·1 answer
  • A ____ by a design professional is used to determine the best system to provide the appropriate level and type of protection.
    6·1 answer
  • "As a ____ database management system, Access is particularly powerful because you can enter data once and then retrieve informa
    6·1 answer
  • What is the rarest Supercar/hypercar you have ever seen?
    7·1 answer
  • What is the film format that many filmmakers feel is superior to any other format?
    13·1 answer
  • what type of machine is a ramp for wheelchairs? compound machine, mechanical, machine complex machine, simple machine
    15·2 answers
  • The best way to ensure the accuracy and safety of your accounts is to:
    10·1 answer
  • How do u type faster
    5·1 answer
  • Doctors at a regional hospital access an online database of patient records that is being developed and tested by a conglomerate
    13·1 answer
  • Explain different users of computer in briefly?​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!