Skip to content

Commit f3b7542

Browse files
committed
Fix asciidoc syntax
Fixes #57 Thank you https://github.com/LenKiMo
1 parent 7d7c2a4 commit f3b7542

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

basics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ Here's how this program works. First, we assign the literal constant value `5` t
307307

308308
Then we add `1` to the value stored in `i` and store it back. We then print it and expectedly, we get the value `6`.
309309

310-
Similarly, we assign the literal string to the variable +s+ and then print it.
310+
Similarly, we assign the literal string to the variable `s` and then print it.
311311

312312
> **Note for static language programmers**
313313
>

control_flow.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Output:
1919

2020
**How It Works**
2121

22-
In this program, we take guesses from the user and check if it is the number that we have. We set the variable +number+ to any integer we want, say `23`. Then, we take the user's guess using the `input()` function. Functions are just reusable pieces of programs. We'll read more about them in the [next chapter](./functions.md#functions).
22+
In this program, we take guesses from the user and check if it is the number that we have. We set the variable `number` to any integer we want, say `23`. Then, we take the user's guess using the `input()` function. Functions are just reusable pieces of programs. We'll read more about them in the [next chapter](./functions.md#functions).
2323

2424
We supply a string to the built-in `input` function which prints it to the screen and waits for input from the user. Once we enter something and press kbd:[enter] key, the `input()` function returns what we entered, as a string. We then convert this string to an integer using `int` and then store it in the variable `guess`. Actually, the `int` is a class but all you need to know right now is that you can use it to convert a string to an integer (assuming the string contains a valid integer in the text).
2525

op_exp.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,10 @@ Perimeter is 14
194194

195195
**How It Works**
196196

197-
The length and breadth of the rectangle are stored in variables by the same name. We use these to calculate the area and perimeter of the rectangle with the help of expressions. We store the result of the expression `length * breadth` in the variable +area+ and then print it using the +print+ function. In the second case, we directly use the value of the expression `2 * (length + breadth)`
198-
in the print function.
197+
The length and breadth of the rectangle are stored in variables by the same name. We use these to calculate the area and perimeter of the rectangle with the help of expressions. We store the result of the expression `length * breadth` in the variable `area` and then print it using the `print` function. In the second case, we directly use the value of the expression `2 * (length + breadth)` in the print function.
199198

200199
Also, notice how Python _pretty-prints_ the output. Even though we have not specified a space between `'Area is'` and the variable `area`, Python puts it for us so that we get a clean nice output and the program is much more readable this way (since we don't need to worry about spacing in the strings we use for output). This is an example of how Python makes life easy for the programmer.
201200

202201
## Summary
203202

204-
We have seen how to use operators, operands and expressions - these are the basic building blocks of any program. Next, we will see how to make use of these in our programs using statements.
203+
We have seen how to use operators, operands and expressions - these are the basic building blocks of any program. Next, we will see how to make use of these in our programs using statements.

0 commit comments

Comments
 (0)