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
mixas84 [53]
3 years ago
7

What is the missing line of code?

Computers and Technology
1 answer:
Ray Of Light [21]3 years ago
5 0

Answer:

phrase[2:5]

Explanation:

Given:

The above code segment

Required

Which instruction returns 'u a'

First, we need to get the index of u in the phrase:

u is at the third position but in programming, index starts at 0.

So, u is at index 2

Next, we need to get the index of a in the phrase:

a is at index 4

One of the ways to return a sub string from a string in python is string[start:stop+1]

Where:

start = 2 ----- index of u

stop = 4  ----- index of a

phrase ---- The string variable

So, the instruction that returns 'u a' is: phrase[2:5]

<em>Where 5 = 4 + 1</em>

You might be interested in
Variablesallow us to manipulate data through the ___________.
gladu [14]

Answer:

Reference

Explanation:

Variables provide reference to the stored data value.

For example:

int i = 0;

Here i is a variable of type int with an initial value of 0. i is a reference to this stored value 0. Now if I want to update the data, I can do so using this reference.

i = 1;

Now the reference is used to manipulate the stored data and change it to 1. In a similar manner all updates to the value can be done using the variable reference.

8 0
3 years ago
Assume that x is a double variable that has been initialized. Write a statement that prints it out, guaranteed to have a decimal
Feliz [49]

Answer:

cout <<showpoint << x; is  the statement which  prints the decimal point,        but without forcing scientific.

Explanation:

The showpoint function in c++ print the decimal point number without forcing scientific.The showpoint function set  the showpoint format flag for the str stream in c++.

Following are the program in c++

#include<iostream> //header file

using namespace std; // namespace

int main() // main function

{

   double x=90.67; // double variable

   cout <<showpoint << x; // display x  without forcing scientific

  return 0;

}

Output

90.6700

6 0
3 years ago
What are the best 3 xbox 360 games ?​
Andru [333]
Halo
GTA
Call of duty
5 0
3 years ago
Read 2 more answers
The rod and crankshaft convert the up-and-down motion of the piston into
OLEGan [10]
Yes and that is correct
7 0
3 years ago
Read 2 more answers
Many web browsers include _____ tools to make it easier for designers to locate the source of a style that has been applied to a
larisa86 [58]

Answer:

Developer tools.

Explanation:

The main aim of developer tools to loading the HTML(hypertext markup language), CSS and JavaScript it describes how much time takes the page to load in the web browser.

The developer tools make the task easier for the designer to locate the source code which is applied to a specific page element.​We can easily see the source code of the particular website by using the Developer tools. So it makes the task easier for programmers and developers.

4 0
3 years ago
Other questions:
  • Why are prepositions, conjunctions, and pronouns usually considered poor choices to use as key words?
    5·2 answers
  • You are using Windows 10 and you have created a file with called “my text” in notepad with a .txt extension type. You need to ch
    13·1 answer
  • "what are the problems with tcp over wireless network?"
    15·1 answer
  • How can you put a logo on html without breaching the copyright, design and patents act
    12·1 answer
  • Importance of Computer in the world​
    12·2 answers
  • Your computer will organize files into
    6·2 answers
  • A program that processes data submitted by the user. Allows a Web server to pass control to a software application, based on use
    11·1 answer
  • Match each career to its various job roles. digital media coordinator digital media specialist photographer sound producer creat
    13·1 answer
  • imagine that you wanted to write a program that asks the user to enter in 5 grade values. the user may or may not enter valid gr
    12·1 answer
  • Define a function that will return the length of a list
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!