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
fiasKO [112]
4 years ago
7

What must you use to create a multi-line string?

Computers and Technology
1 answer:
IrinaK [193]4 years ago
7 0

Answer:

A single pair of three consecutive double quotation marks.

Explanation:

In Python, a multi-line string can be created by enclosing it in three double quotation marks. For example:

string = """This is a Python multi-line string

This is used to print string in multiple lines

This uses three consecutive quotation marks"""

print(string)

Output:

This is a Python multi-line string

This is used to print string in multiple lines

This uses three consecutive quotation marks

In addition to using three double quotation marks, \n and brackets ( ) are also used to create multi-line string in Python.

You might be interested in
Write a java program to create an array of 5 numbers. accept a number and search for that number in the array using linear searc
yKpoI14uk [10]

Answer:

import java.util.Random;

public class brainly {

   public static void main(String[] args) {

       int[] test_list = create_array(5);

       int target = 2; // change all of these

       int index = search(test_list, target);

       if (index == -1) {

           System.out.println("Target " + target + " not found.");

       }

       else {

           System.out.println("Target " + target + " found at index " + index);

       }

   }

   public static int[] create_array(int num) {

       Random rand = new Random();

       int[] list = new int[num];

       for (int i = 0; i < num; i++) {

           int rand_int = rand.nextInt(num); // change this to what you want

           list[i] = rand_int;

           System.out.print(rand_int);

       }

       System.out.println("\n");

       return list;

   }

 

   public static int search(int arr[], int x) {  

       int n = arr.length;  

       for(int i = 0; i < n; i++) {  

           if(arr[i] == x)  

               return i;  

       }  

       return -1;  

   }  

}

Explanation:

First off, your question is very vague, anyway, here is my interpretation.

The method create_array creates an array with the specified length.

It creates an array out of random numbers from 0 to the length.

The method search method is a simple linear search, stepping by one each cycle.

I honestly have no idea what the question is, but I added an attachment of the code.

Download java
5 0
3 years ago
12. Realizar un algoritmo que genere un número aleatorio, el usuario debe adivinar cual es el número generado para esto tendrá 3
skelet666 [1.2K]

Answer:

Explanation:

El siguiente algoritmo esta escrito en Java y genera un numero aleatorio. Despues le pide al usario que intente adivinar el numero. Si el usario adivina correctamente entoces le dice que fue correcto y termina el programa. Si no adivina bien entonces dice Incorrecto y le pide otra adivinanza al usario hasta llegar a la tercera adivinanza y se termina el programa.

import java.util.Random;

import java.util.Scanner;

class Brainly{

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       Random ran = new Random();

       int numero = ran.nextInt(20);

       for (int x = 0; x <= 2; x++) {

           System.out.println("Adivina el numero entre 0 y 20: ");

           int respuesta = in.nextInt();

           if (respuesta == numero) {

               System.out.println("Correcto");

               break;

           } else {

               System.out.println("Incorrecto");

           }

       }

   }

}

3 0
3 years ago
Which of the following is false? Group of answer choices A) A string may include letters, digits, and various special characters
Oduvanchick [21]

Answer:

Option (b) is the correct answer.

Explanation:

Here in option "D", "C" language is used, so the answer is given on the behalf of "C" language and in "C" language, the String is written in double quotes which are opposite of option "b" hence it is a wrong statement. hence it is the correct option for this question.

The String is also called a word in the English language which is made of character. So in C programming language, a user needs to create a character array to store the string because the array is used to create multiple variables of the same type and variable is used to store the data.

In any programming language character array is used to store the string but for back-end and the user uses String data type for the front-end.

  • Option a states that the string is made up of character, letter, digits and special symbol which is correct.
  • Option c states that a string is assigned on the character array which is correct.
  • Option d states that the last character of the "String" is the "NULL" character which is also right.

4 0
3 years ago
It is always safe to enter personal information into a pop-up window. true or false.
Rufina [12.5K]
False ( it's never safe to enter personal information into a pop window cause hacker always around us)
4 0
4 years ago
Which of the follow represents a form of disruptive technology? Tend to open new markets and destroy old ones A new way of doing
RSB [31]

Answer: All of the above are included

Explanation: Disruptive technology is the created for the manipulation of the business operations and related components significantly.It works by changing the habits of the business system by its more superior standards and ways.

The opening of new market to eliminate the older market, invoking in the marketplace for cheap range of goods and making a new strategy that does not fulfill the demand of the customer are disruptive strategy as they change the regular way of business operation through their techniques.

4 0
4 years ago
Other questions:
  • An engineer is assigned the task of reducing the air pollutants being released from a power plant that generates electricity by
    9·1 answer
  • Word processing programs have different view options that you can use depending on the tasks you’re performing. Which option hel
    11·1 answer
  • PLEASE HELP
    6·1 answer
  • Which PowerShell command will upgrade the VM configuration version to take advantage of the new features in Windows Server 2016?
    12·1 answer
  • Which of the following is not a compilation error? Group of answer choices a. Placing a semicolon at the end of the first line o
    13·1 answer
  • a) Write out an abstract class to represent a ball. Include data fields to store the weight of the ball as a double value and th
    6·2 answers
  • The use of computer in a modern world is as a result of complexity. true or false
    6·1 answer
  • Why is it important to install updates? Why should you use the Power button on the Start menu instead of the Power button on you
    7·1 answer
  • Software created according to user choice​ true or false
    5·1 answer
  • Hahaahhaahahuahaahahhahqha
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!