Ask Question
31 January, 23:21

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. 31 January, 23:24
    0
    10 CLEAR: PRINT "A lightning flash: between the forest trees I have seen water.": END
  2. 31 January, 23:38
    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.
Know the Answer?
Not Sure About the Answer?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers