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]
3 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]3 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]3 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
A(n) _____ is a type of man-in-the-middle attack where an attacker captures the data that is being transmitted, records it, and
professor190 [17]

Answer:

wireless replay attack

Explanation:

Based on the scenario being described within the question it can be said that the type of attack that is being described is known as a wireless replay attack. Like mentioned in the question this is a network attack where an individual hijacks data in the middle of it being sent in order to copy it before the data reaches the intended recipient. This information can then be used for whatever the attacker intends.

6 0
3 years ago
Read 2 more answers
Write an expression that computes the integer average of the int variables exam1 and exam2 (both declared and assigned values).
Minchanka [31]

Answer:

#include <iostream>

using namespace std;

int main()

{

   int exam1 = 70;

   int exam2 = 85;

   int examAverage;

   examAverage = (exam1+exam2)/2;

   cout <<"The Average of Exam1 and Exam2 is: "<<examAverage<<endl;

   return 0;

}

Explanation:

Using the C++, we declare the three variables all of type

exam1

exam2 and

examAverage

We assign initial values of 70 and 85 to exam1 and exam2 respectively

7 0
3 years ago
The part of the poppet valve that contacts the valve seat is called the?
Amiraneli [1.4K]
C. is the correct answer
6 0
3 years ago
Read 2 more answers
Write a program that creates a two-dimensional array named height and stores the following data:
antiseptic1488 [7]

Answer:

Explanation:

The following code is written in Java and it simply creates the 2-Dimensional int array with the data provided and then uses the Arrays class to easily print the entire array's data in each layer.

import java.util.Arrays;

class Brainly {

   public static void main(String[] args) {

       int[][] arr = {{16, 17, 14}, {17, 18, 17}, {15, 17, 14}};

   

     

      System.out.print(Arrays./*Remove this because brainly detects as swearword*/deepToString(arr));

   }

}

4 0
2 years ago
Read 2 more answers
The main activity area or the brain of the computer is called the ________
Darya [45]

Motherboard

Its a computer chip



6 0
3 years ago
Other questions:
  • Windows Live SkyDrive is an example of _____ storage.
    13·1 answer
  • ______________ is only one of the marketing mix tools that acompany uses to achieve its marketing objectives.
    7·1 answer
  • What important practice can help prevent hardware trouble?
    6·1 answer
  • Write a function to reverse a given string. The parameter to the function is a string. Function should store the reverse of the
    12·1 answer
  • I need help. I wanna help a friend by giving him my powerpoint but I dont want him to steal my work. Is their anyway to restrict
    8·1 answer
  • Anyone know how to delete it in my laptop
    10·1 answer
  • Consumer consequences for illegally downloading software
    6·1 answer
  • Animals living in burrows under the ground is an interaction between the biosphere and the
    11·1 answer
  • What can I do If my Texas Instrument TI-84 calculator is not giving accurate answers?
    6·1 answer
  • How would you use keywords and Boolean operators to help you with a web search?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!