Programming has now made this possible by introducing I/O to every program.
I/I is the part of the program that allows you to print out messages on a screen, like the hello world program we ran, and receive input from the users.
In python, the two main I/O functions are print() and input().
Python Output
The output function for python is print() as you probably know already. But the main syntax is:
Objects represents the message you want to display
sep is used to separate characters, by default it is a space. But you can manually change it
which is the screen.
end is used to jump to a new line
Flush is a Boolean argument which is false by default
Python Input
The function for receiving inputs from users is input (__prompt)
The computer prints out the prompt as some sort of questioner and leaves the cursor blinking to enable user input.


No comments:
Post a Comment