111k views
1 vote
The ________ function reads a piece of data that has been entered at the keyboard and returns that piece of data, as a string, back to the program.

User Bitpshr
by
8.5k points

2 Answers

5 votes

Answer:

The input function reads a piece of data that has been entered at the keyboard and returns that piece of data, as a string, back to the program.

Step-by-step explanation:

To read the user entrance, the input function () expects that after entering the input the user presses the enter key, after which input () reads this as a string, so if the expected input is a number it must be converted using is the int () or float conversion functions () .

User Cockypup
by
8.3k points
0 votes

The input function reads a piece of data that has been entered at the keyboard and returns that piece of data, as a string, back to the program. This function is designed to accept data directly from the user, Similar function is the function raw_input() used in Python programming, which asks the user for a string of data (ended with a newline), and simply returns the string.

User Shawndumas
by
7.4k points