diff --git a/tests/results/10 b/tests/results/10 index cc8bdf8..d5f9028 100644 --- a/tests/results/10 +++ b/tests/results/10 @@ -1,6 +1,6 @@ # How do I copy a file in Python? #  -# shutil (http://docs.python.org/2/library/shutil.html) has many methods +# shutil (http://docs.python.org/3/library/shutil.html) has many methods # you can use. One of which is: from shutil import copyfile diff --git a/tests/results/15 b/tests/results/15 index 12fb820..bc1df86 100644 --- a/tests/results/15 +++ b/tests/results/15 @@ -296,7 +296,8 @@ filled_dict.setdefault("five", 5) # filled_dict["five"] is set to 5 filled_dict.setdefault("five", 6) # filled_dict["five"] is still 5 -# Sets store ... well sets (which are like lists but can contain no duplicates) +# You can declare sets (which are like unordered lists that cannot contain +# duplicate values) using the set object. empty_set = set() # Initialize a "set()" with a bunch of values some_set = set([1, 2, 2, 3, 4]) # some_set is now set([1, 2, 3, 4]) @@ -629,7 +630,7 @@ # You can import modules import math -print math.sqrt(16) # => 4 +print math.sqrt(16) # => 4.0 # You can get specific functions from a module from math import ceil, floor diff --git a/tests/results/2 b/tests/results/2 index c7b10dc..7b1f52f 100644 --- a/tests/results/2 +++ b/tests/results/2 @@ -1,24 +1,17 @@ -#  -# ls -#  -# List directory contents. -#  -# List files one per line: - ls -1 -#  -# List all files, including hidden files: - ls -a -#  -# Long format list (permissions, ownership, size and modification date) of all files: - ls -la -#  -# Long format list with size displayed using human readable units (KB, MB, GB): - ls -lh -#  -# Long format list sorted by size (descending): - ls -lS -#  -# Long format list of all files, sorted by modification date (oldest first): - ls -ltr -#  -#  +# Displays everything in the target directory +ls path/to/the/target/directory + +# Displays everything including hidden files +ls -a + +# Displays all files, along with the size (with unit suffixes) and timestamp +ls -lh  + +# Display files, sorted by size +ls -S + +# Display directories only +ls -d */ + +# Display directories only, include hidden +ls -d .*/ */ diff --git a/tests/results/21 b/tests/results/21 index 854cab3..47840a1 100644 --- a/tests/results/21 +++ b/tests/results/21 @@ -486,6 +486,7 @@ // Hello world! // 43 // [Function: myFunc] +// true // To only consider properties attached to the object itself // and not its prototypes, use the `hasOwnProperty()` check. diff --git a/tests/results/22 b/tests/results/22 index 854cab3..47840a1 100644 --- a/tests/results/22 +++ b/tests/results/22 @@ -486,6 +486,7 @@ // Hello world! // 43 // [Function: myFunc] +// true // To only consider properties attached to the object itself // and not its prototypes, use the `hasOwnProperty()` check. diff --git a/tests/results/3 b/tests/results/3 index 3d2f50a..41a116a 100644 --- a/tests/results/3 +++ b/tests/results/3 @@ -1,24 +1,17 @@ -# -# ls -# -# List directory contents. -# -# List files one per line: - ls -1 -# -# List all files, including hidden files: - ls -a -# -# Long format list (permissions, ownership, size and modification date) of all files: - ls -la -# -# Long format list with size displayed using human readable units (KB, MB, GB): - ls -lh -# -# Long format list sorted by size (descending): - ls -lS -# -# Long format list of all files, sorted by modification date (oldest first): - ls -ltr -# -# +# Displays everything in the target directory +ls path/to/the/target/directory + +# Displays everything including hidden files +ls -a + +# Displays all files, along with the size (with unit suffixes) and timestamp +ls -lh + +# Display files, sorted by size +ls -S + +# Display directories only +ls -d */ + +# Display directories only, include hidden +ls -d .*/ */