- 2

What is the difference between input and output??

what is input and what is output?

16th Jul 2017, 12:51 PM
oussama kabbara
3 Antworten
+ 2
Input = ask user to input (lol) some data inside the program Output = the program display something
16th Jul 2017, 1:04 PM
Drax
Drax - avatar
0
If you have a program that can sum two numbers, you can hard-code that numbers: a = 5 b = 3 print(a + b) # Output '8' But, the program in this example will print always '8' (which is the output). That's why you can make it to want input from the users. So the result of the sum (the output) can be different. a = int(input()) # Input some number b = int(input()) # Input another number print(a + b) # Output the sum
16th Jul 2017, 1:09 PM
Boris Batinkov
Boris Batinkov - avatar
0
Input data are the declared variables. Any result of your operations, or calls of functions, or anything else that uses the input data and displays them it's output.
17th Jul 2017, 5:59 AM
Diana Pîşlac
Diana Pîşlac - avatar