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
Naya [18.7K]
3 years ago
11

Write a one-line program to output the following haiku.

Computers and Technology
2 answers:
Serggg [28]3 years ago
8 0

10 CLEAR: PRINT "A lightning flash: between the forest trees I have seen water.": END

IrinaVladis [17]3 years ago
7 0

Answer:

The solution code is written in Python 3.

  1. print("A lighting flash:\nbetween the forest trees\nI have seen water.")

Explanation:

The question requires us to print a single sentence in three different lines. To do so, we can use the escape sequence "\n" to create a new line. So, we just need to include an escape sequence "\n" after "....flash:" and also after "...trees" in the print function, the entire sentence will be printed in three lines as required by the question:

First line

A lightning flash:

Second line

between the forest trees

Third line

I have seen water.

You might be interested in
Explain how QoS might be implemented
Artist 52 [7]

Answer:

 The quality of service basically provide the sufficient quality in the IP network and it is also known as traffic shaping. As, it assign the priority to every device and the services in the network. It basically recognize the several types of the traffic moving in the network.

The implementation of quality of service is basically done in many network applications by reserve the bandwidth and specific path in the network system.

The various network device control the packet flow so that the network resources can easily accept packets in the network.

 

 

6 0
3 years ago
How many units are considered a full time student at a community college in California?
Crazy boy [7]

Answer:

12

Explanation:

According to Saddleback college located in California;

12 units are considered full-time student status.

You may take as little as 0.5 units or as many as 19.0 units during a single semester. To take more than 19 units you are required to obtain special permission from the Counseling Department.

7 0
3 years ago
Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, a
Viktor [21]

Answer:

The program to this question can be given as:

Program:

import java.util.*;

//import package for user input  

class Main     //define class

{

public static void main(String a[])  

//define main function

{

int positive_number=0,negative_number=0,count=0,num; //define variable

double total=0,avg=0;  

//creating Scanner class object.

Scanner ob = new Scanner(System.in);

System.out.println("Enter an integer, when done input 0: "); //message

num= ob.nextInt();

//taking input from user

if (num==0)  //check number equal to 0  

{  

System.out.println("No numbers are entered except 0"); //message

System.exit(1);

}

else

{

while (num!= 0)  

{    

   if (num> 0)

   {

positive_number++; // Increase positives

}

else

{

negative_number++; // Increase negatives

}

total=total+num; // Accumulate total

count++;    // Increase the count

num=ob.nextInt();

}

// Calculate the average

avg=total/count;

// Display values

System.out.println("The positive number is:"+positive_number);

System.out.println("The negatives number is:"+negative_number);

System.out.println("total is:"+total);

System.out.println("average is:"+avg);

}

}

}

Output:

Enter an integer, when done input 0: 22

2

1

4

0

The positive number is:4

The negatives number is:0

total is:29.0

average is:7.25

Explanation:

In the above program firstly we import the package for user input then we define a class that is main in this class we define the main method in the main method we define variable. Then we create a scanner class object for user input. In the number variable, we take multiple inputs from the user and also check that the user does not insert 0 at the starting of the program. To check this we use the condition statement that is a number equal to 0 then it will terminate the program. In the else part we first declare the loop that checks that inserted number is positive and negative and in this, we calculate the total of the numbers and at the end of the loop, we calculate the average of the number and print all the values.

4 0
3 years ago
Read 2 more answers
What does the following code print?double[] myList = {1, 5, 5, 5, 5, 1};double max = myList[0];int indexOfMax = 0;for (int i = 1
Liula [17]

Answer:

This code will print: 4

Explanation:

Following is the step-by-step explanation for the given code:

  • Given is the array of data type double named myList, it has entries, 1, 5, 5, 5,5, 1:

                    double[] myList = {1, 5, 5, 5, 5, 1};

  • Now the first element of the array (1) with index 0 will be stored in the variable max (data type double).

                 double max = myList[0];  

  • A variable indexOfMax having datatype int will be initiated as 0.

                 int indexOfMax = 0;

  • Now for loop will be used to find the maximum number of the array. The variable i will be put as index for each element to compare with first element. If the checked element is greater than or equal to the integer in max, it will be replaced. So at the end the variable max will have value 5 that will be at index i = 4.

                    for (int i = 1; i < myList.length; i++)

                            { if (myList[i] >= max)

                               { max = myList[i];

  • Now the variable i that is the index for max value will be stored in the variable indexOfMax (indexOfMax = 4).

                  indexOfMax = i; }}

  • At end the value stored in variable indexOfMax will be printed, so 4 will be printed as output.

              System.out.println(indexOfMax);

i hope it will help you!

7 0
3 years ago
Jack and Diane are creating each ClassID following this pattern: first two letters of ClassName (one uppercase, one lowercase),
Norma-Jean [14]

Answer:

i dont know 123 IdK

Explanation:

6 0
3 years ago
Other questions:
  • In java write a program:A contact list is a place where you can store a specific contact with other associated information such
    8·1 answer
  • Whats the difference between search engine and web browser?
    6·2 answers
  • If str 1 and str2 are both Strings, which of the following expressions will correctly
    13·1 answer
  • Fatal error: Class 'Drush\Commands\DrushCommands' not found in /Users/amy/testsite/Sites/acquia dev desktop/fresh-install/module
    7·1 answer
  • Blank is a type of drag and drop code to help beginner
    14·1 answer
  • Photography is harder with digital cameras than with film cameras.<br>true<br>false
    6·2 answers
  • How can you know if the person or organization providing the information has the credentials and knowledge to speak on this topi
    13·1 answer
  • Describe the components of a CPU--the CU, ALU, and Cache--and explain how they interact to make the CPU function.
    13·1 answer
  • Explain the difference between undecidable problems and unreasonable time algorithms. Be specific.
    5·1 answer
  • Paisa pay is facilitated in which e commerce website​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!