Skip to content

Commit 929b20e

Browse files
committed
Merge pull request #338 from hjwp/editorsyntaxhighlights
Mention syntax highlighting, and why we install an editor in the first place
2 parents e8585f2 + 3d08068 commit 929b20e

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

en/code_editor/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,16 @@ Sublime Text is a very popular editor with a free evaluation period. It's easy t
2323
Atom is an extremely new code editor created by [GitHub](http://github.com/). It's free, open-source, easy to install and easy to use. It's available for Windows, OSX and Linux.
2424

2525
[Download it here](https://atom.io/)
26+
27+
28+
29+
# Why are we installing a code editor?
30+
31+
You might be wondering why we are installing this special code editor software, rather than using something like Word or Notepad.
32+
33+
The first is that code needs to be **plain text**, and the problem with programs like Word and Textedit is that they don't actually produce plain text, they produce rich text (with fonts and formatting), using custom formats like rtf.
34+
35+
The second reason is that code editors are specialised in editing code, so they can provide helpful features, like highlighting code with colour according to its meaning, or automatically closing quotes for you.
36+
37+
We'll see all this in action later. Soon, you'll come to think of your trusty old code editor as one of your favourite tools :)
38+

en/python_introduction/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ OK, enough of strings. So far you've learned about:
8888

8989
- __the prompt__ - typing commands (code) into the Python prompt results in answers in Python
9090
- __numbers and strings__ - in Python numbers are used for math and strings for text objects
91-
- __operators__ - like + and *, combine values to produce a new one
91+
- __operators__ - like + and \*, combine values to produce a new one
9292
- __functions__ - like upper() and len(), perform actions on objects.
9393

9494
These are the basics of every programming language you learn. Ready for something harder? We bet you are!
@@ -417,6 +417,9 @@ Earlier, we picked out a code editor from the [code editor](../code_editor/READM
417417
print('Hello, Django girls!')
418418
```
419419

420+
> **Note** You should notice one of the coolest thing about code editors: colours! In the Python console, everything was the same colour, but now you should see that the `print` function is a different colour from the string inside it. That's called "syntax highlighting", and it's a really useful helping hand when coding. Watch out for the colour of things, and you'll get a hint for when you forget to close a string, or make a typo in a keyword name (like the `def` in a function, which we'll see below). This is one of the reasons we use a code editor :)
421+
422+
420423
Obviously, you're a pretty seasoned python developer now, so feel free to write some code that you've learned today.
421424

422425
Now we need to save the file and give it a descriptive name. Let's call the file **python_intro.py** and save it to your desktop. We can name the file anything we want, the important part here is to make sure the file ends in __.py__, this tells our computer that this is a **python executable file** and Python can run it.

0 commit comments

Comments
 (0)