@@ -5,7 +5,7 @@ date: 2017-10-26
5
5
6
6
email: LiaScript@web.de
7
7
8
- version: 1.0.0
8
+ version: 1.0.1
9
9
10
10
language: en
11
11
@@ -17,21 +17,22 @@ persistent: true
17
17
18
18
logo: media/cover.jpg
19
19
20
- import: https://raw.githubusercontent.com/LiaTemplates/PyScript/0.0.2 /README.md
20
+ import: https://raw.githubusercontent.com/LiaTemplates/PyScript/0.0.3 /README.md
21
21
22
22
@repl: @PyScript.repl(```@0```)
23
23
24
24
-->
25
25
26
- Author: Lisa Tagliaferri
27
- Publisher: DigitalOcean
26
+ __ Author__ Lisa Tagliaferri
27
+
28
+ __ Publisher__ DigitalOcean
28
29
29
30
![ The Creative Commons Logo] ( media/file5.png )
30
31
31
32
This work is licensed under a Creative Commons
32
33
Attribution-NonCommercial-ShareAlike 4.0 International License.
33
34
34
- ISBN 978-0-9997730-0-0
35
+ __ ISBN __ 978-0-9997730-0-0
35
36
36
37
# How To Code in Python 3
37
38
@@ -1538,8 +1539,6 @@ print(poem.islower())
1538
1539
1539
1540
Now we can run these small programs and see the output:
1540
1541
1541
- Todo
1542
-
1543
1542
``` bash Output of movie string
1544
1543
False
1545
1544
True
@@ -1909,10 +1908,8 @@ Specifying the stride of 2 as the last parameter in the Python syntax
1909
1908
` ss[0:12:2] ` skips every other character. Let's look at the characters that are
1910
1909
printed in red:
1911
1910
1912
- todo
1913
1911
1914
- [ S] {.highlight}a[ m] {.highlight}m[ y] {.highlight}
1915
- [ S] {.highlight}h[ a] {.highlight}r[ k] {.highlight}!
1912
+ <span style =" color :red " >S</span >a<span style =" color :red " >m</span >m<span style =" color :red " >y</span ><span style =" color :red " >S</span >h<span style =" color :red " >a</span >r<span style =" color :red " >k</span >!
1916
1913
1917
1914
Note that the whitespace character at index number 5 is also skipped with a
1918
1915
stride of 2 specified.
@@ -1930,7 +1927,7 @@ Specifying the stride of 4 as the last parameter in the Python syntax
1930
1927
` ss[0:12:4] ` prints only every fourth character. Again, let's look at the
1931
1928
characters that are printed in red:
1932
1929
1933
- [ S ] {.highlight} amm[ y ] {.highlight} Sh[ a ] {.highlight} rk!
1930
+ < span style = " color : red " >S</ span > amm< span style = " color : red " >y</ span > Sh< span style = " color : red " >a</ span > rk!
1934
1931
1935
1932
In this example the whitespace character is skipped as well.
1936
1933
@@ -1974,7 +1971,7 @@ string as no index numbers are included in the parameters, and reversing the
1974
1971
string through the negative stride. Additionally, by having a stride of -2 we
1975
1972
are skipping every other letter of the reversed string:
1976
1973
1977
- [ ! ] {.highlight}k [ r ] {.highlight}a [ h ] {.highlight}S [ \[ whitespace \] ] {.highlight}y [ m ] {.highlight}m [ a ] {.highlight} S
1974
+ < span style = " color : red " >!</ span >k< span style = " color : red " >r</ span >a< span style = " color : red " >h</ span >S y< span style = " color : red " >m</ span >m< span style = " color : red " >a</ span > S
1978
1975
1979
1976
The whitespace character is printed in this example.
1980
1977
@@ -4868,9 +4865,9 @@ __Output__ `[0, 3, 6, 9, 12]`
4868
4865
By printing out the list ` numbers ` with the stride set to ` 3 ` , only every third
4869
4866
item is printed:
4870
4867
4871
- [ ** 0** ] {.highlight} , 1, 2, [ ** 3** ] {.highlight} , 4, 5,
4872
- [ ** 6** ] {.highlight} , 7, 8, [ ** 9** ] {.highlight} , 10, 11,
4873
- [ ** 12** ] {.highlight}
4868
+ [ ** 0** ] <!-- style="color:red" --> , 1, 2, [ ** 3** ] <!-- style="color:red" --> , 4, 5,
4869
+ [ ** 6** ] <!-- style="color:red" --> , 7, 8, [ ** 9** ] <!-- style="color:red" --> , 10, 11,
4870
+ [ ** 12** ] <!-- style="color:red" -->
4874
4871
4875
4872
Slicing lists with both positive and negative index numbers and indicating
4876
4873
stride provides us with the control to manipulate lists and receive the output
@@ -5882,9 +5879,9 @@ __Output__ `(0, 3, 6, 9, 12)`
5882
5879
By printing out the tuple ` numbers ` with the stride set to ` 3 ` , only every third
5883
5880
item is printed:
5884
5881
5885
- [ ** 0** ] {.highlight} , 1, 2, [ ** 3** ] {.highlight} , 4, 5,
5886
- [ ** 6** ] {.highlight} , 7, 8, [ ** 9** ] {.highlight} , 10, 11,
5887
- [ ** 12** ] {.highlight}
5882
+ [ ** 0** ] <!-- style="color:red" --> , 1, 2, [ ** 3** ] <!-- style="color:red" --> , 4, 5,
5883
+ [ ** 6** ] <!-- style="color:red" --> , 7, 8, [ ** 9** ] <!-- style="color:red" --> , 10, 11,
5884
+ [ ** 12** ] <!-- style="color:red" -->
5888
5885
5889
5886
Slicing tuples with both positive and negative index numbers and indicating
5890
5887
stride provides us with the control to receive the output we're trying to
0 commit comments