Ask Question
8 September, 11:22

print (Enter the first row.) # TODO - Implement. Write code to get the first line from the user. # An example input line: X - O # In this example, the first entry is X, the second entry is -, indicating blank, and the third entry is O print (Enter the second row.) # TODO - Implement print (Enter the third row.) # TODO - Implement

+1
Answers (1)
  1. 8 September, 13:34
    0
    Following is the python code to get three lines from user:

    print ("Enter the first row.")

    #TODO - Implement. Write code to get the first line from the user.

    # An example input line: X - O

    firstLine = input ();

    # In this example, the first entry is X, the second entry is -, indicating blank, and the third entry is O

    print ("Enter the second row.")

    # TODO - Implement

    secondLine = input ();

    print ("Enter the third row.")

    # TODO - Implement

    thirdLine = input ();

    Output:

    Enter the first row.

    X - O

    Enter the second row.

    Y - O

    Enter the third row.

    Z - O

    Explanation:

    In python input () function is used to take input from user. In the above code, the first entered line will be stored in variable firstLine, second line in the variable secondLine and third line in the variable thirdLine.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “print (Enter the first row.) # TODO - Implement. Write code to get the first line from the user. # An example input line: X - O # In this ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers