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
A Uniform Resource Locator (URL) consists of three separate parts: network protocol, host, and web browser.
FrozenT [24]
That is false. are you doing it on a computer course.                                             <span />
3 0
3 years ago
Read 2 more answers
Circular errors are caused by adding the cell name of _______ cell to its own formula.
Sati [7]

Circular errors are caused by adding the cell name of the active cell to its own formula.

8 0
3 years ago
I have this assignment due TONIGHT BEFORE 10PM! Please help. 50 points for whoever will help!! Here is the assignment.
saveliy_v [14]

Answer:

# include <iostream.h>

# include <conio.h>

using namespace std;

int generatelist ( int z[]);

int addlist(int x []; int y []);

int mullist(int x []; int y []);

int displayList(int z[]);

main()

{

int a[10] , b[10], add[10], mul[10];

cout<<"Enter value in array a";

generatelist(a[10]);

cout<<"Enter value in array b";

generatelist(b[10]);

for (int i=0; i<=9; i++)

{

add[i]=addlist( a[i], b[i]);

cout<<"sum of list = "<< add[i];

}

for (int i=0; i<=9; i++)

{

mul[i]=mullist( a[i], b[i]);

cout<<"multiplication of list = "<< mul[i];

}

for (int i=0; i<=9; i++)

{

displayList(a[i]);

}

for (int i=0; i<=9; i++)

{

displayList(b[i]);

}

for (int i=0; i<=9; i++)

{

displayList(add[i]);

}

for (int i=0; i<=9; i++)

{

displayList(mul[i]);

}

getch();

}

int generatelist ( int z[])

{

for (int j=0 ; j<=9 ; j++)

{

cin>>z[j];

return z[j]

}

}

int addlist(int x []; int y [])

{

int add

add=x+y;

return add;

}

int mullist(int x []; int y [])

{

int mul

mul=x*y;

return mul;

}

int displayList(int z[]);

{

for(int i=0; i<=9;i++)

cout << z[i]

}

7 0
4 years ago
How is science and technology used in the society​
Molodets [167]

Answer: science and technology

Explanation:

The essence of how science and technology contributes to society is the creation of new knowledge, and then utilization of that knowledge to boost the prosperity of human lives.

4 0
3 years ago
Eddie typed a word, used the undo command, and then decided he really wanted to keep the word. Eddie should _____.
9966 [12]

Sense Eddie clicked the undo command he wouldn't want to click it again, if he does more words will leave. Sense he did not copy the word, he cannot paste it. And if he would press Undo twice, then that would take him back further, so what he wants to do is click the redo command.


Hope this helps.


<u><em>Marcy~</em></u>

7 0
4 years ago
Read 2 more answers
Other questions:
  • Question: Can a single switch port handle two mac addresses?
    8·1 answer
  • Choose the appropriate of an image that supports the text. You should also make sure that the image is
    12·2 answers
  • Assume s is a string of lower case characters.
    15·1 answer
  • (40 pointsAnd brainliest answer ASAP) Maria is recording her friend’s graduation ceremony. How can Maria ensure that the video i
    15·1 answer
  • A tiny spot on an LCD monitor display screen that permanently remains black when it should be activated and displaying color is
    12·1 answer
  • Describe what each of the following functions in R do.1. t2. matplot3. c4. seq5. legend6. matrix7. rownames8. colnames9. type of
    14·1 answer
  • WILL MARK BRAINLIEST!!!!!!!!!!!
    13·2 answers
  • And Python code for the following programming problem and the pseudo code below
    5·1 answer
  • Hawaii and japan are examples of islands made by? You have to write it.
    11·1 answer
  • Tristan just downloaded a new game he wants to play on his computer. What kind of file should he open in order to install and ru
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!