Ask Question
27 December, 19:54

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. 27 December, 22:49
    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?
Get 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 & 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