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
mta software development fundamentals You are creating an application that accepts input and displays a response to the user. Yo
Harlamova29_29 [7]

Answer: Console-Based

Explanation:

A console based application is an application that helps in facilitating the reading and the writing of the characters from a console.

It is vital in the provision of a simple user interface for the applications that requires little interaction. Since the application accepts input and displays a response to the user and cannot create a graphical interface for this application, then it's a console based application.

8 0
2 years ago
Consider the following relations:
ArbitrLikvidat [17]

Answer:

Check the explanation

Explanation:

--Query 1)

SELECT ename, sal, age

FROM Emp;

--Query 2)

SELECT did

FROM Dept

WHERE floot = 10 AND budget<15000;

4 0
3 years ago
2. Feet to Inches One foot equals 12 inches. Design a function named feetToInches that accepts a number of feet as an argument,
MariettaO [177]

Answer:

See the below the answer written in Matlab

Explanation:

function inches=feetToInches(feet)

prompt='enter the value of feet in digits';

feet=input(prompt)% ask for the value in feet that needs to be converted to inches

inches =feet*12; % converts feet to inches

x=['the value in inches is:  ',num2str(inches)];

disp(x) %display the result of the convertion

end

8 0
3 years ago
What is a system of computers that are joined together and connect to peripheral devices and can’t be accessed from home
harina [27]
<span>What is a system of computers that are joined together and connect to peripheral devices and can’t be accessed from home = LAN for Local Area Network, unless it's connected to the internet and you allow VPN/RAS system access you will not be able to connect to a LAN remotely.</span>
7 0
3 years ago
Which type of software is created and updated by a worldwide community of programmers and is available for​ free?
Ede4ka [16]
Open source is created and updated by a worldwide community of programmers and is available for​ free. Many students are in luck, as they can easily study publicly accessible codes and have a possibility to make better software. It also has lots of advantages, such as getting <span>high-quality results when the source code is passed around, tested and fixed.The most important thing - it<span> is a valuable learning opportunity for programmers and opportunity to improve their skills.</span></span>
5 0
3 years ago
Other questions:
  • What do you click to create a new presentation in Normal view? A. Section B. Blank Presentation C. Layout D. New Slide
    14·2 answers
  • If Denise specifies Jan? as a search criterion, Excel will locate all of the following records EXCEPT ____.
    9·1 answer
  • How are a cell's content and format related?
    12·2 answers
  • Fedora operating system
    9·1 answer
  • Jane Estroisch works as a manager in a multidomestic firm. She focuses on the long-term questions facing the organization such a
    15·1 answer
  • The purpose of maintaining a network of digital forensics specialists is to develop a list of colleagues who specialize in areas
    7·2 answers
  • Various gabs in the digital divide​
    8·1 answer
  • PLS HURRRYYYYYY!1!1!1!1!1
    5·2 answers
  • Write a loop that continually asks the user what pets the user has until the user enters rock in which case the loop ends. It sh
    6·1 answer
  • What will help the programmer understand what’s going on in the program?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!