Ask Question
20 August, 15:56

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

A lightning flash:

between the forest trees

I have seen water.

Hint: this can be done using only one print command.

+2
Answers (2)
  1. 20 August, 18:26
    0
    The solution code is written in Python 3.

    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.
  2. 20 August, 18:29
    0
    10 CLEAR: PRINT "A lightning flash: between the forest trees I have seen water.": END
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a one-line program to output the following haiku. A lightning flash: between the forest trees I have seen water. Hint: this can be ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers