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
Nesterboy [21]
3 years ago
10

Consider the following code:

Computers and Technology
1 answer:
jarptica [38.1K]3 years ago
3 0

Answer:

apple apple

banana

Explanation:

Given - Consider the following code:

x = "apple"

y = x

z = "banana"

To find - print(x + " " + y + "\n" + z)

It will print -

apple apple

banana

First will apple followed by '' '' that is space then y which is equal to x that is apple then followed by ''\n'' new line then banana.

So, The answer would be

apple apple

banana

Notation used -

'' '' represents space between two values

''\n'' represents new line

You might be interested in
Nancy would like to configure an automatic response for all emails received while she is out of the office tomorrow, during busi
marishachu [46]

Answer:

I believe the answer is the second one

5 0
3 years ago
Read 2 more answers
Give two reasons why it is important to upgrade your browser when a new version becomes available.
kupik [55]
1. Higher speed
2. New features
3. Less bugs
4. Upgrades
4 0
3 years ago
5.17 (Calculating Sales) An online retailer sells five products whose retail prices are as follows: Product 1, $2.98; product 2,
Dima020 [189]

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

   

    //Initialize the prices as constants

    final double PRODUCT_1_PRICE = 2.98;

    final double PRODUCT_2_PRICE = 4.50;

    final double PRODUCT_3_PRICE = 9.98;

    final double PRODUCT_4_PRICE = 4.49;

    final double PRODUCT_5_PRICE = 6.87;

   

    //Declare the other variables

    int productNumber, quantitySold;

    double total = 0.0;

   

    //Create a Scanner object to get input

    Scanner input = new Scanner(System.in);

   

    //Create a while loop

    while(true){

        //Ask the user to enter the productNumber

     System.out.print("Enter the product number or 999 to quit: ");

     productNumber = input.nextInt();

     

     // Stop the loop, if productNumber is 999(sentinel value, you may choose any value you want)

     if(productNumber == 999)

         break;

     

     //Ask the user to enter the quantitySold

     System.out.print("Enter the quantity sold: ");

     quantitySold = input.nextInt();

     

     //Create a switch statement that works depending on the productNumber entered.

     //For example, if the productNumber is 1, it multiplies the quantitySold by PRODUCT_1_PRICE

     //   and adds the result to the total. If productNumber is 2, it does the same for product 2 ...

     switch(productNumber){

         case 1:

             total += quantitySold * PRODUCT_1_PRICE;

             break;

         case 2:

             total += quantitySold * PRODUCT_2_PRICE;

             break;

         case 3:

             total += quantitySold * PRODUCT_3_PRICE;

             break;

         case 4:

             total += quantitySold * PRODUCT_4_PRICE;

             break;

         case 5:

             total += quantitySold * PRODUCT_5_PRICE;

             break;

     }

    }

 

 //Print the total (when the loop is done)

 System.out.println("The total is $" + total);

}

}

Explanation:

*The code is in Java.

You may see the explanation as comments in the code.

4 0
3 years ago
Which phrase best describes a scenario in Excel 2016?
Airida [17]

Answer:

what are the phrases?

Explanation:

6 0
3 years ago
(e) The entries in each column of the array A are sorted into strictly increasing order.
gizmo_the_mogwai [7]
The answer is 3 because
5 0
2 years ago
Other questions:
  • You can type notes of what to cover when presenting the show in the______ pane.
    15·1 answer
  • How can you logout your account and do not want to have this anymore
    12·2 answers
  • An array name and index are separated using ____.
    13·1 answer
  • What word describes the complexity of document
    13·1 answer
  • Cyberterrorism is the use of terrorism to attack (Points : 1) public libraries. computer based networks. government spy networks
    15·1 answer
  • What image format should be used to keep the file size manageable​
    14·1 answer
  • Which statement best describes the purpose of the Insert Function dialog box?
    13·1 answer
  • The average price of milk increased from $3.00 last year to $3.50 this year. This is most likely due to:
    14·1 answer
  • Accenture has partnered with a global construction company that specializes in building skyscrapers. The company wants better ma
    12·1 answer
  • Describe, with examples, the way in which a defect in software can cause harm to a person, to the environment, or to a company
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!