Skip to content

Commit 38b46df

Browse files
committed
Harmonise indentation
Parts of these tutorials were indented with tabs, and others with 4 spaces. This conforms them all to 4 spaces.
1 parent d179c41 commit 38b46df

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

python/lesson2/tutorial.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ it a name then set its value.
1414

1515
Now in the REPL type:
1616

17-
>>> year = 2016
17+
>>> year = 2016
1818

1919
In this example you have now stored the value `2016` into the variable `year`.
2020
See what happens next when you type `year' into the REPL. Does it show it back
@@ -30,9 +30,9 @@ variables with the maths operations we learnt in the previous tutorial.
3030

3131
Now in the REPL type the following:
3232

33-
>>> revenue = 1000
34-
>>> costs = 200
35-
>>> profit = revenue - costs
33+
>>> revenue = 1000
34+
>>> costs = 200
35+
>>> profit = revenue - costs
3636

3737
Now type `profit` to see the results of this calculation.
3838

@@ -49,22 +49,22 @@ strings.
4949

5050
Now in the REPL type:
5151

52-
>>> name = 'codebar'
53-
>>> url = "codebar.io"
52+
>>> name = 'codebar'
53+
>>> url = "codebar.io"
5454

5555
Now type `name` and `url` to see these strings shown back to you. As you can
5656
see Python allows both single and double quotes to denote a string variable.
5757
Double quotes are required if there is going to be an apostrophe in the string.
5858

5959
For example:
6060

61-
message = "I'm a string"
61+
message = "I'm a string"
6262

6363
Sometimes you will need to use an apostrophe within a single quote, on
6464
occasions like this it is recommended to use "string escaping". This would look
6565
like:
6666

67-
message ='I\'m a string'
67+
message ='I\'m a string'
6868

6969
Try storing a string within a variable without quotes, see what happens?
7070
Numbers do not require quotation marks, whereas they are mandatory for storing
@@ -122,20 +122,20 @@ command. Let's create a variable in which to store the user input.
122122

123123
Now type this into your REPL:
124124

125-
>>> lucky_number = input("What is your lucky number? ")
125+
>>> lucky_number = input("What is your lucky number? ")
126126

127127
Type back your answer after it asks you.
128128

129129
Now in the REPL type:
130130

131-
>>> food = input("What is your favourite food? ")
131+
>>> food = input("What is your favourite food? ")
132132

133133
Now we are going to put your response into another variable.
134134

135135
Now try:
136136

137-
>>> my_name = input("What is your name? ")
138-
>>> greeting = "Hello " + my_name
137+
>>> my_name = input("What is your name? ")
138+
>>> greeting = "Hello " + my_name
139139

140140
Then type `greeting` into your REPL to receive your message.
141141

python/lesson4/tutorial.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ later to run these statements. Python comes with plenty of functions already
1313
built in that you can use to perform common tasks. One example should be
1414
something you're already familiar with:
1515

16-
>>> print("This is a function")
17-
This is a function
18-
16+
>>> print("This is a function")
17+
This is a function
18+
1919
It is also possible to store the output of a function in a variable for future
2020
use. Let's try this with the built in function `len()`, which will provide us
2121
with the length of a string:
2222

23-
>>> length_of_my_string = len("This is my string")
24-
>>> print(length_of_my_string)
25-
17
23+
>>> length_of_my_string = len("This is my string")
24+
>>> print(length_of_my_string)
25+
17
2626

2727
The function `len()` takes one *argument*: the string it's measuring, and it
2828
returns an *integer*: the length of the string. Here, we're storing the output

0 commit comments

Comments
 (0)