Input and output

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 

input_output

From: https://www.tes.com/lessons/ZnhIVryvqXaUVg/inputs-and-outputs

One thought on “Input and output

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s