Lesson 6

This is Python Lesson 6

 We have just about finished our topic on variables now we are moving on to inputs and outputs. These pieces of code are going to be interactive. 

The above piece of code contains an input and an output. At the start of the code we have : name =  input.  This is necessary for the rest of the code. The next line is something new, instead of print it says name. name has replaced print. Then we have a normal print.

What the code does is first ask a question, then it waits for your answer followed by the enter key. Then it print Hello and your answer. So if I said my name was Frederella it would print : Hello Frederella. You can use multiple inputs and have complex pieces of code using this.