Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@

|Name|Objective & Instructions|Solution|Comments|
|--------|--------|------|----|
| Hello World! | [Exercise](exercises/hello_world/hello_world.md) | Solution](solutions/hello_world/hello_world.md | |
| Hello World! | [Exercise](exercises/hello_world/hello_world.md) | [Solution](solutions/hello_world/hello_world.md | |
| Python Characteristics | [Exercise](exercises/hello_world/python_characteristics.md) | [Solution](solutions/hello_world/python_characteristics.md) | |
| What is the result? - Level 1 | [Exercise](exercises/hello_world/what_is_the_result_lvl_1.md) | [Solution](solutions/hello_world/what_is_the_result_lvl_1.md) | |
| What is the result? - Level 2 | [Exercise](exercises/hello_world/what_is_the_result_lvl_2.md) | | |
| What is the result? - Level 2 | [Exercise](exercises/hello_world/what_is_the_result_lvl_2.md) | [Solution](solutions/hello_world/what_is_the_result_lvl_2.md) | |

<a name="exercises-objects"></a>
## Objects & Data Types
Expand Down Expand Up @@ -1644,4 +1644,4 @@ def home():
return 'main website'

app.add_url_rule('/', view_func=home)
```
```
13 changes: 13 additions & 0 deletions solutions/hello_world/what_is_the_result_lvl_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## What is the result? - Level 2

1. What is the result of each of the following statements? Explain why.

* `"" == " "` - False \
The space between double quotations is whitespace sensitive. The left side corresponds to an empty string of no characters while the right side corresponds to a single whitespace element

* `'two' > 'three'` - True \
The values being compared here are of a type `string`, so the comparison operator will perform an element-wise comparison of each character in each of the items using their unicode order. For the first element, `'t'` and `'t'` are compared and found to be equal. Next, the second values, `'w'` and `'h'` are compared. And since the unicode value of `'w'` is higher than that of `'h'`, python will halt the comparison there and return the comparison as `True`


* `[] == []` - True \
This is a comparison of two empty lists, and since the types are the same and both have no elements, they are equated to be the same