Ask 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 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

+3
Answers (1)
  1. 2 March, 10:05
    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 & 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