@@ -48,8 +48,9 @@ A name can be reassigned (or re-bound) to different values (different object typ
4848>> > print (type (my_first_variable))
4949< class ' str' >
5050
51+ >> > my_first_variable = ' You can call me "str".' # <-- Strings can be declared using single or double quote marks.
5152>> > print (my_first_variable)
52- " Now, I'm a string. " # <-- Strings can be declared using single or double quote marks .
53+ You can call me " str " .
5354```
5455
5556
@@ -63,7 +64,7 @@ Using `SCREAMING_SNAKE_CASE` signals that the name should not be re-assigned, or
6364## Functions
6465
6566The ` def ` keyword begins a [ function definition] [ function definition ] .
66- Each function can have zero or more formal [ parameters] [ parameters ] in ` () ` parenthesis , followed by a ` : ` colon.
67+ Each function can have zero or more formal [ parameters] [ parameters ] in ` () ` parentheses , followed by a ` : ` colon.
6768Statements for the _ body_ of the function begin on the line following ` def ` and must be _ indented in a block_ .
6869
6970
@@ -99,7 +100,7 @@ Functions _explicitly_ return a value or object via the [`return`][return] keywo
99100 return number_one + number_two
100101
101102
102- # Calling the function in the Python terminal returns the sum of the numbers.
103+ # Calling the function in the Python shell returns the sum of the numbers.
103104>> > add_two_numbers(3 , 4 )
1041057
105106
@@ -111,7 +112,7 @@ Functions _explicitly_ return a value or object via the [`return`][return] keywo
111112```
112113
113114
114- Functions that do not have an _ explicit_ ` return ` expression will _ implicitly_ return the [ ` None ` ] [ none ] object.
115+ Functions that do not have an _ explicit_ ` return ` statement will _ implicitly_ return the [ ` None ` ] [ none ] object.
115116This means that if you do not use ` return ` in a function, Python will return the ` None ` object for you.
116117The details of ` None ` will be covered in a later exercise.
117118For the purposes of this exercise and explanation, ` None ` is a placeholder that represents nothing, or null:
@@ -123,7 +124,7 @@ def add_two_numbers(number_one, number_two):
123124 result = number_one + number_two
124125
125126
126- # Calling the function in the Python terminal appears
127+ # Calling the function in the Python shell appears
127128# to not return anything at all.
128129>> > add_two_numbers(5 , 7 )
129130>> >
@@ -167,8 +168,8 @@ TypeError: number_to_the_power_of() missing 1 required positional argument: 'num
167168
168169# Calling methods or functions in classes and modules.
169170>> > start_text = " my silly sentence for examples."
170- >> > str .upper(start_text) # Calling the upper() method for the built-in str class.
171- " MY SILLY SENTENCE FOR EXAMPLES."
171+ >> > str .upper(start_text) # Calling the upper() method from the built-in str class.
172+ ' MY SILLY SENTENCE FOR EXAMPLES.'
172173
173174# Importing the math module
174175import math
0 commit comments