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
saveliy_v [14]
2 years ago
12

Assume that sentence is a variable that has been associated with a string consisting of words separated by single space characte

rs with a period at the end. for example: "this is a possible value of sentence." write the statements needed so that the variable secondword is associated with the second word of the value of sentence . so, if the value of sentence were "broccoli is delicious." your code would associate secondword with the value "is" .
Computers and Technology
2 answers:
Morgarella [4.7K]2 years ago
6 0

Answer:

The solution code is written in Python.

  1. text  = "broccoli is delicious."
  2. wordList = text.split(" ")
  3. secondword = wordList [1]

Explanation:

Firstly, let us declare a variable text and assign it with a string (Line 1).

Next, we can use the split() method and use single space character " " as the delimiter to separate the words in the string by turning it into a word list (e.g. ["broccoli",  "is", "delicious."]) (Line 2)

We can use the index 1 to address the second word from the wordList and then associate it with variable secondword (Line 3).

sleet_krkn [62]2 years ago
3 0

The right code is,

secondWord = sentence.substr (sentence.find ("`") + 1);

secondWord = secondWord.substr (0, secondWord.find ("`"));

You might be interested in
After modifying a numbered list in her presentation, Su notices the numbers and the text are too close to each other. She knows
IrinaK [193]

Answer:

1. View, show

2. to the right

Explanation:

On edg

8 0
3 years ago
How does consumption of alcohol affect your driving skills? Name three ways that alcohol can affect your driving.
Natali [406]

Drinking and driving is not recommended. You need your, hands, feet, brain, and eyes to maneuver around. Drivers must be alert and able to make judgments quickly. Drinking and driving can affect the driver in the following ways.

Judgment

The brain is the first part of the body that is affected by alcohol. Your ability to think clearly and plan ahead levels down to as low as .02%

Concentration

Alcohol can leave you concentrating on only one action. You need to stay focused on several things at once. Alcohol will interrupt your focus and might result to an accident. Many accidents are as a result of a short attention span or a distracted driver.

Vision

Alcohol, especially when taken in excess, will impair your eye movement. Not only will it slow down your eye muscle function but  will also reduce peripheral vision.

8 0
3 years ago
Read 2 more answers
A new product was introduced in 2003, which functions as both an identification device and a medium of communication. It uses in
Svetllana [295]

Answer:

nTag

Explanation:

nTag describe -Providing information on freight limitations-Preparing documentation-Packing exhibit materials-Helping to ensure that shipments arrive on time.

5 0
3 years ago
Explain how loops can be utilized in list processing. Please provide Python examples in your response.
Dominik [7]

Answer:

data = [0,1,2,3,4]

for i in range(4):

   print(data[i])

   i+=1

Explanation:

Loops can be utilized in a listing process by looping back to a list with a variable while the loop increases that variable to give a different response from the list.

8 0
2 years ago
Carbon monoxide poisoning can result from breathing
Mamont248 [21]
The answer is the letter a
6 0
3 years ago
Other questions:
  • Musccanic Inc., a company that manufactures microprocessors, updates the technology used in its microprocessors once every four
    15·1 answer
  • _____________ refers to know-what and know-why of technology.
    12·1 answer
  • Tools enable people to connect and exchange ideas
    7·2 answers
  • The icon below represents the ____________.
    8·1 answer
  • Which key is used to indent the first line of a paragraph to the right?
    15·2 answers
  • Jenis jenis perangkat keras?
    14·1 answer
  • A) Suppose a computer has an instruction pipeline with 4 phases. How many cycles (if there are no delays) would it take to compl
    13·1 answer
  • Listed here are a few camera angles and their images.
    10·1 answer
  • List three features of the third generation of computers
    13·1 answer
  • True or False: A sequential search of a list assumes that the list elements are sorted in ascending order.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!