Skip to content

Commit 8fc4452

Browse files
committed
Merge pull request Akuli#1 from SpiritualForest/master
Fixed spelling errors and repharsed a sentence.
2 parents 47718ce + 2e40d9f commit 8fc4452

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The `>>>` in the beginning of the line means that IDLE is ready and you can ente
4040

4141
### Using Python as a calculator
4242

43-
In the interactive `>>>` mode, IDLE will simply echo back everything you type into it. One of the simpliest things you can type are numbers:
43+
In the interactive `>>>` mode, IDLE will simply echo back everything you type into it. One of the simplest things you can type are numbers:
4444

4545
```py
4646
>>> 1
@@ -192,7 +192,7 @@ Python uses radians instead of degrees, so degrees need to be converted to radia
192192
>>>
193193
```
194194

195-
See the [offical documentation of the math module](https://docs.python.org/3/library/math.html) for more info about it.
195+
See the [official documentation of the math module](https://docs.python.org/3/library/math.html) for more info about it.
196196

197197
### Exercises
198198

2.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 2. Strings, variables, booleans and None
1+
# 2. Strings, variables, Booleans and None
22

33
### Strings
44

@@ -20,7 +20,7 @@ NameError: name 'hello' is not defined
2020
>>>
2121
```
2222

23-
But putting the text in quotes works. You can use single quotes or double quotes. They work the same way, but things entered with double quotes will be echoed back with single quotes. Pieces of text inside quotes with text inside them are known as strings.
23+
But putting the text in quotes works. You can use single quotes or double quotes. They work the same way, but things entered with double quotes will be echoed back with single quotes. Pieces of text inside quotes are known as strings.
2424

2525
```py
2626
>>> 'hello'
@@ -65,7 +65,7 @@ TypeError: Can't convert 'int' object to str implicitly
6565
>>>
6666
```
6767

68-
You can also use `len` to get the length of a string in characters. This will come in handy later in this tutorial.
68+
You can also use `len()` to get the length of a string in characters. This will come in handy later in this tutorial.
6969

7070
```py
7171
>>> len('hello')
@@ -98,7 +98,7 @@ Variables are easy to understand. They simply contain data. _[*]_
9898
>>>
9999
```
100100

101-
_[*] In fact, variables point to data stored in the computer's memory. All strings, integers and other objects are just data in the RAM. See [this video](https://www.youtube.com/watch?v=_AEJHKGk9ns) for more info._
101+
_[*] In fact, variables point to data stored in the computer's memory. All strings, integers and other objects are just data in RAM. See [this video](https://www.youtube.com/watch?v=_AEJHKGk9ns) for more info._
102102

103103
Variable names can be multiple characters long. They can contain uppercase characters and special characters, but most of the time you should be using simple, lowercase variable names. You can also use underscores.
104104

@@ -171,7 +171,7 @@ Now you also understand why typing hello to the prompt didn't work in the beginn
171171
>>>
172172
```
173173

174-
### booleans and None
174+
### Booleans and None
175175

176176
In Python, and many other programming languages, `=` is assigning and `==` is comparing. `a = 1` sets a to 1 and `a == 1` checks if a is 1.
177177

4.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ while its_raining:
171171
# We'll jump back to the second line from here
172172
```
173173

174-
Don't get scared when you ran the program. Like I wrote in the introduction, this will not destroy or crash your computer. It just repeats the same thing quickly. You can interrupt the program by hitting Ctrl+C. You'll get an error message saying that a `KeyboardInterrupt` occurred, that's normal. The output is like this:
174+
Don't get scared when you run the program. Like I wrote in the introduction, this will not destroy or crash your computer. It just repeats the same thing quickly. You can interrupt the program by hitting Ctrl+C. You'll get an error message saying that a `KeyboardInterrupt` occurred, that's normal. The output is like this:
175175

176176
>>> ================================ RESTART ================================
177177
>>>
@@ -204,7 +204,7 @@ Again, you can interrupt the program with Ctrl+C.
204204
_[*] There are many ways to interrupt while loops, including `while True` loops. `break` will end the innermost loop it's in, and `exit()` will quit the whole program._
205205

206206
### Exercises
207-
1. Make a program that asks for a password and prints `Welcome!`, `Access denied` or `You didn't enter anything` depending on did the user enter the correct password, a wrong password or nothing at all by pressing Enter without typing anything.
207+
1. Make a program that asks for a password and prints `Welcome!`, `Access denied` or `You didn't enter anything` depending on whether the user entered the correct password, a wrong password, or nothing at all by pressing Enter without typing anything.
208208
2. Make a program that asks for username and password and checks them. Make users "foo" and "bar" with passwords "biz" and "baz".
209209
3. Make a program that asks for username and password and gives the user an infinite number of attempts, so the user can always try again if he mistypes the password.
210210
4. Can you limit the number of attempts to 3?

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[Python](https://en.wikipedia.org/wiki/Python_\(programming_language\)) is a high-level, interactive and object-oriented programming language. Its simple syntax makes it a great choice for a first programming language for a beginner.
44

5-
No tutorial is good for everyone. This one is aimed at people with no programming experience at all. If you have programmed in the past with some other language you probably want to read [the offical tutorial](https://docs.python.org/3/tutorial/) instead. Like most other tutorials, this tutorial starts with maths. You can skip that if you hate maths.
5+
No tutorial is good for everyone. This one is aimed at people with no programming experience at all. If you have programmed in the past with some other language you probably want to read [the official tutorial](https://docs.python.org/3/tutorial/) instead. Like most other tutorials, this tutorial starts with math. You can skip that if you hate math.
66

77
This tutorial uses Python 3. Python 2 is not under active development anymore, and more and more projects are moving to Python 3. Currently there are a few packages that don't support Python 3 that well at the time of writing this (such as twisted), but if you haven't programmed yet Python 3 is a great choice.
88

@@ -17,6 +17,6 @@ Most importantly, when learning a programming language you need to **experiment
1717
Here's a list of chapters in this tutorial:
1818

1919
1. [Installing Python and using it as a calculator](1.md)
20-
2. [Strings, variables, booleans and None](2.md)
20+
2. [Strings, variables, Booleans and None](2.md)
2121
3. [Using functions and storing code in files](3.md)
2222
4. [If, elif, else and while](4.md)

0 commit comments

Comments
 (0)