One of the basic things every one who learns programming do is to say Hello to hte world, and to make the user say hello to the world; in python 3 terms, it would be the print command, and the input command.

So really really basic code would be the command input stored in a token, and the command print using that token:

x = input ()

print (x)

But there is a problem, how would the user knows he has to type something or what are you saying to him?, and even if he knows, he wouln’d know what to type or what are you shpwing him. The input and the print command in python has de option to incude text that will aid the user, so let say we want the user to input a number in order to know his nameand say hello to him:

name = input (“What’s your name? )

print (“Hello “; name)

So now the user will know he has to type his name, and we are going to say hello.

  • if you want to combine text with a variable, tou have to add a comma before the text
    (“Test it!”, name)

Now, the worng way to do it its not putting parenthesis, they are completely nessesary

So now you know how to input/user output in python 3!

CC BY 4.0 Input and output, the basics: Masteries 10, 28 by charliegdrummer is licensed under a Creative Commons Attribution 4.0 International License.