Learning to Code. Without Video. Part One: (Hello world!)

This code is still valid Python and will run and execute even though it doesn’t do what we expected.

In this case, a bit of proofreading will help us track down the mistake, but not every bug is so simple.

As you go along, you may encounter issues where the code still runs, but the outcome isn’t what you expected.

In a future lesson, we’ll talk about strategies for tracking those kinds of bugs down and fixing them.

Whew!We only wrote one very simple program so far, but really, we’ve covered a lot.

Here are some of the things you’ve accomplished so far:You installed the latest version of the Python programming language.

You wrote and executed your first Python computer program.

You’ve learned some new terminology:function — a predefined sequence of operations that allows you to accomplish the same task multiple times without rewriting the same code.

call — the term used to execute the code of a function (like printing to the terminal).

Also called invocation.

argument — the information given (or passed) to a function that impacts what the function does.

string — a sequence of characters wrapped in quotation marks that the Python interpreter is intended to process literally.

"Hello world!"exception — the name given for an event that causes Python code to stop executing and display an error message.

stack trace — information provided by Python when an exception is raised that points to the location in the code where the exception occurred.

syntax — the formal specification of a programming language that lays down the specific rules of how words and symbols can be arranged for code to be interpreted correctly.

Try this!Before the next lesson try these exercises:Change the text inside the string to print a different message.

Search for one of the error messages above with a search engine.

What websites do you find with information about the error message?Next time:In the next lesson we’re going to discuss and practice using the foundational information data types of programming along with some of the common operations that can be used when working with them.

Feel free to leave a comment if you find anything in this lesson that is misleading, confusing or inaccurate.

You can also reach me here on medium: David Harris or on Twitter: @forbiddenvoid.. More details

Leave a Reply