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
Cerrena [4.2K]
3 years ago
5

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" . (python)my answer wassecondWord = sentence.substr(sentence.find(" ") + 1)secondWord = secondWord.substr(0, secondWord.find(" "))but i am keep on getting error message saying ⇒ You almost certainly should be using: [ ] ⇒ We think you might want to consider using: : ⇒ Solutions with your approach don't usually use: , (comma)
Computers and Technology
1 answer:
Nezavi [6.7K]3 years ago
3 0

Answer:

When you are working with substrings in python you should treat the strings as lists, according to your answer the corrected code is given below:

sentence = "This is a possible value of sentence."

secondWord = sentence[sentence.find(" ")+1:]

secondWord = secondWord[0:secondWord.find(" ")]

print(secondWord)

Explanation:

#Define the value of the sentence for testing

sentence = "This is a possible value of sentence."

#Define a variable temp that starts when a blank space is find in the sentence to the end, sentence[n:] --> means everything in string after index "n"

temp = sentence[sentence.find(" ")+1:]

#Define the secondWord variable, you start at index 0 because in temp we already delete the first word and ends when finds the other blank space.

secondWord = temp[0:temp.find(" ")]

print(secondWord)

You might be interested in
Which osi layer defines the functions of logical network-wide addressing and routing?
IRISSAK [1]
Answer: The Network Layer
5 0
4 years ago
What characteristics of IT careers can be a challenge for employees
IRINA_888 [86]

It is essential to continually be learning about new technology.(APEX VERIFIED)

8 0
3 years ago
Read 2 more answers
When you use the keyboard to scroll to a different position in the document, the ____ automatically moves when you press the des
FrozenT [24]

Answer:

Option C i.e., insertion point is the correct option.

Explanation:

if any user or person scrolls the following contents by using the keyboard from one position to another position in the document of the user then, the insertion point moves automatically without any implementation when the user presses any key they want. If the user clicks on the arrow keys then, it also works like that. So, that's why the following option is correct.

8 0
3 years ago
Hello, please help write code in C++. Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go nort
krok68 [10]

Answer:

Please Find attached  c++ code file.

Explanation:

  1. Ask User to enter highway number.
  2. Check if highway is primary or auxiliary.
  3. Check if highway number is even / odd.
  4. Find Primary high number for an auxiliary highway

Check if highway is primary or auxiliary.

Use if condition to check if the entered number is in between 0 and 99.If it's true than the highway is primary otherwise it's an auxiliary highway.

Check if highway number is even / odd.

To check if a number is even or odd we use simple modulo formula. In mathematics modulo returns the reminder of a division operation on two numbers.If modulo of a number and 2 is equal to zero than that number is an even number other wise its an odd number.

(Any number ) mod 2 = 0

Find Primary high number for an auxiliary highway

As mentioned in the question last two digits of highway number is the number of primary high.

To Find last two digits of number apply modulo operation on highway number and 100. it will provide last two digits of number specifying our primary highway.

Download cpp
3 0
4 years ago
A small company is requesting a quote to refresh its wireless network. The company currently runs 60 autonomous APs and has plan
Annette [7]

Answer:

A small company is requesting a quote to refresh its wireless network. The company currently runs 60 autonomous APs and has plans to increase wireless density by 50% in the near future. The requirements state that the chosen solution should significantly decrease the management overhead of the current wireless network. The following should be recommended by the vendor in response to the quote request:

B. The use of autonomous APs with a wireless controller.

Explanation:

  • The option A  and D are not correct as the use of lightweight APs are not required here because they are already using autonomous APs which are fulfilling their needs.
  • The option B is correct as the use of autonomous APs with a wireless controller will allow them to decrease the management overhead as the wireless controller is used to manage the Access points in larger quantities.
  • The option C is incorrect as the load balancers are used to increase the capacity and reliability of applications as they distribute the traffic over number of servers so it is unable to decrease the management overhead.  
6 0
4 years ago
Other questions:
  • Your friend is working on fixing their Homework assignment. They need a lot of help. You know all the bugs in the file, but due
    12·1 answer
  • Alcohol does not affect the driver judgement
    8·2 answers
  • is either the number of bits used to indicate the color of a single pixel, or the number of bits used for each color component o
    7·1 answer
  • Analysts use _____ to show the objects that participate in a use case and the messages that pass between the objects over time f
    12·1 answer
  • Which of the following occurs when the amount of money earned is greater than the
    5·1 answer
  • The part of the computer that contains the brain, or central processing unit, is also known as
    5·1 answer
  • When a binary tree is full to its next to last level and its leaves on the last level are filled from left to right the tree is
    14·1 answer
  • What is this app for ?
    10·2 answers
  • Anyone know what I’m supposed to do?
    11·1 answer
  • Name the factors which of the following resources relate to :
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!