In a computer program, an input is what the user enters when it is required. For example, you can ask for a name in order to display the phrase Hello, and the name provided by the person. In this case, the name would be the input. On the other hand, the output is the result the program gets after the input is given. For example, if the name was Gina, the output would be Hello, Gina.
In python, this is how we would do the example:
name=input(“What is your name?”)
print(“Hello, “,name)
We use the symbol = to assign a value to a variable. You can learn more about that here: https://www.tutorialspoint.com/python/python_variable_types.htm
From: https://www.tes.com/lessons/ZnhIVryvqXaUVg/inputs-and-outputs
One thought on “Input and output”