Hacker News new | ask | show | jobs
by draker 3616 days ago
Maybe if it's the only thing you show someone but most tutorials will start with hello world! and then progress to variables, string interpolation, expressions through a sequence of:

1. Try changing the statement print your name.

2. Having to type the same thing over and over is unnecessary, we can save it in a variable.

3. You can use variables inside the print statement through a process called string interpolation.

4. In addition to strings, variables can hold many types of values, including numbers.

5. Operators can be used to manipulate values. Do some math with the variables.

6. Receive input and save in variable.

From there you can go to conditional statements, loops and functions.

1 comments

Yeah that is a very straight-forward sequence, however some people just seem to be more comfortable with numbers. Either approach could be taken as long as it is mapped out like you did above.