You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"blurb": "Python is a dynamic and strongly typed object-oriented programming language in which variables can be bound and re-bound to any data type. It employs both duck typing and gradual typing (via type hints). Python uses significant indentation to denote code blocks and puts strong emphasis on code readability.",
2
+
"blurb": "Python is a dynamic and strongly typed programming language in which variables can be bound and re-bound to any data type. It employs both duck typing and gradual typing (via type hints). Python uses significant indentation to denote code blocks and puts strong emphasis on code readability.",
Copy file name to clipboardExpand all lines: concepts/basics/about.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# basics
2
2
3
-
Python is a [dynamic and strongly][dynamic typing in python] typed [object-oriented][object oriented programming] programming language.
3
+
Python is a [dynamic and strongly typed][dynamic typing in python] programming language.
4
4
It employs both [duck typing][duck typing] and [gradual typing][gradual typing], via [type hints][type hints].
5
5
Imperative, declarative (e.g., functional), and object-oriented programming _styles_ are all supported, but internally **[everything in Python is an object][everythings an object]**.
6
6
@@ -41,15 +41,15 @@ On the Python track, [variables][variables] are always written in [`snake_case`]
41
41
## Name Assignment (Variables & Constants)
42
42
43
43
In Python, there are no keywords used in creating variables or constants.
44
-
Instead, programmer defined [_names_][facts-and-myths-about-python-names] (also called _variables__) can be bound to any type of object using the assignment `=` operator: `<name> = <value>`.
44
+
Instead, programmers can bind [_names_][facts-and-myths-about-python-names] (also called _variables__) to any type of object using the assignment `=` operator: `<name> = <value>`.
45
45
A name can be reassigned (or re-bound) to different values (different object types) over its lifetime.
46
46
47
47
For example, `my_first_variable` can be re-assigned many times using `=`, and can refer to different object types with each re-assignment:
48
48
49
49
50
50
```python
51
-
>>> my_first_variable =1#Name bound to an integer object of value one.
52
-
>>> my_first_variable =2#Name re-assigned to integer value 2.
51
+
>>> my_first_variable =1#my_first_variable bound to an integer object of value one.
52
+
>>> my_first_variable =2#my_first_variable re-assigned to integer value 2.
53
53
54
54
>>>print(type(my_first_variable))
55
55
<class'int'>
@@ -65,7 +65,7 @@ For example, `my_first_variable` can be re-assigned many times using `=`, and ca
65
65
"Now, I'm a string."# Strings can be declared using single or double quote marks.
66
66
67
67
import collections
68
-
>>> my_first_variable = collections.Counter([1,1,2,3,3,3,4,5,6,7]) # Now the name has been re-bound to a Counter object.
68
+
>>> my_first_variable = collections.Counter([1,1,2,3,3,3,4,5,6,7]) # Now my_first_variable has been re-bound to a Counter object.
69
69
>>>print(type(my_first_variable))
70
70
<class'collections.Counter'>
71
71
@@ -106,7 +106,7 @@ Statements for the _body_ of the function begin on the line following `def` and
106
106
107
107
108
108
```python
109
-
# The body of this function is indented by 2 spaces, & prints the sum of the numbers
109
+
# The body of a function is indented by 2 spaces, & prints the sum of the numbers.
Copy file name to clipboardExpand all lines: concepts/basics/introduction.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,24 @@
1
1
# Introduction
2
2
3
-
Python is a [dynamic and strongly][dynamic typing in python] typed programming language.
4
-
It employs both [duck typing][duck typing] and [gradual typing][gradual typing] via [type hints][type hints].
3
+
Python is a [dynamic and strongly typed][dynamic typing in python] programming language.
4
+
It employs both [duck typing][duck typing] and [gradual typing][gradual typing], via [type hints][type hints].
5
5
6
-
While Python supports many different programming _styles_, internally **everything in Python is an [object][everythings an object]**.
7
-
This includes numbers, strings, lists, and even functions.
6
+
Imperative, declarative (e.g., functional), and object-oriented programming _styles_ are all supported, but internally **[everything in Python is an object][everythings an object]**.
7
+
8
+
Python puts a strong emphasis on code readability and (_similar to Haskell_) uses [significant indentation][significant indentation] to denote function, method, and class definitions.
9
+
10
+
Python was created by Guido van Rossum and first released in 1991.
8
11
9
12
10
13
## Name Assignment (Variables & Constants)
11
14
12
-
Programmer defined [_names_][facts-and-myths-about-python-names] (also called _variables__) can be bound to any type of object using the assignment `=` operator: `<name> = <value>`.
15
+
Programmers can bind [_names_][facts-and-myths-about-python-names] (also called _variables__) to any type of object using the assignment `=` operator: `<name> = <value>`.
13
16
A name can be reassigned (or re-bound) to different values (different object types) over its lifetime.
14
17
15
18
16
19
```python
17
-
>>> my_first_variable =1#Name bound to an integer object of value one.
18
-
>>> my_first_variable =2#Name re-assigned to integer value 2.
20
+
>>> my_first_variable =1#my_first_variable bound to an integer object of value one.
21
+
>>> my_first_variable =2#my_first_variable re-assigned to integer value 2.
19
22
20
23
>>>print(type(my_first_variable))
21
24
<class'int'>
@@ -47,7 +50,7 @@ Statements for the _body_ of the function begin on the line following `def` and
47
50
48
51
49
52
```python
50
-
# The body of this function is indented by 2 spaces, & prints the sum of the numbers
53
+
# The body of a function is indented by 2 spaces, & prints the sum of the numbers.
Copy file name to clipboardExpand all lines: exercises/concept/guidos-gorgeous-lasagna/.docs/introduction.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,13 +24,13 @@ On the Python track, [variables][variables] are always written in [`snake_case`]
24
24
25
25
## Name Assignment (Variables & Constants)
26
26
27
-
Programmer defined [_names_][facts-and-myths-about-python-names] (also called _variables__) can be bound to any type of object using the assignment `=` operator: `<name> = <value>`.
27
+
Programmers can bind [_names_][facts-and-myths-about-python-names] (also called _variables__) to any type of object using the assignment `=` operator: `<name> = <value>`.
28
28
A name can be reassigned (or re-bound) to different values (different object types) over its lifetime.
29
29
30
30
31
31
```python
32
-
>>> my_first_variable =1#Name bound to an integer object of value one.
33
-
>>> my_first_variable =2#Name re-assigned to integer value 2.
32
+
>>> my_first_variable =1#my_first_variable bound to an integer object of value one.
33
+
>>> my_first_variable =2#my_first_variable re-assigned to integer value 2.
34
34
35
35
>>>print(type(my_first_variable))
36
36
<class'int'>
@@ -62,7 +62,7 @@ Statements for the _body_ of the function begin on the line following `def` and
62
62
63
63
64
64
```python
65
-
# The body of this function is indented by 2 spaces, & prints the sum of the numbers
65
+
# The body of a function is indented by 2 spaces, & prints the sum of the numbers.
0 commit comments