Input/Output

--Originally published at Sierra's Blog

Input:

Input is the way you can make Python ask you something it’s how the program interacts with the user.

Input is used to accept the data from the user.

How does it work?

Variable + = + input + (“text” )

  • input()     – The code that forces Python to accept the data from the user
  • Variable   – The name you’re assigning to the input.
  • (“text”)   – The text that will make the user understands what you’re asking for.

Examples:

Inputandoutput1

And the outcome is:

Inputandoutput2

Inputandoutput3

Inputandoutput4

Output:

output is to send a emission, from python to the user, the basic way is using the print statement.