-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
117 changed files
with
956 additions
and
2,755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2,548 changes: 0 additions & 2,548 deletions
2,548
codewof/general/management/commands/sample-data/nz-schools.csv
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Divisible by 3 | ||
|
||
Write a function `divisible_by_three(x)` that takes a Python list of numbers, `x`, and prints out the | ||
numbers in the list that are divisble by 3. | ||
|
||
For example if we call `divisible_by_three([6,97,43,27,99])` the output should be: | ||
|
||
``` | ||
6 | ||
27 | ||
99 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
def divisible_by_three(x): | ||
for num in x: | ||
if num % 3 == 0: | ||
print(num) |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/divisible-by-3/test-case-1-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
divisible_by_three([6,97,43,27,99]) |
3 changes: 3 additions & 0 deletions
3
codewof/programming/content/en/divisible-by-3/test-case-1-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
6 | ||
27 | ||
99 |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/divisible-by-3/test-case-2-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
divisible_by_three([1,4,98]) |
Empty file.
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/divisible-by-3/test-case-3-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
divisible_by_three([-3,105,-936, 65, 33, 90]) |
5 changes: 5 additions & 0 deletions
5
codewof/programming/content/en/divisible-by-3/test-case-3-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-3 | ||
105 | ||
-936 | ||
33 | ||
90 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Double evens | ||
# Double Evens | ||
|
||
Write a function `double_even(number)` that takes a number and returns double the number if it is even. | ||
Otherwise it returns the original number. |
6 changes: 6 additions & 0 deletions
6
codewof/programming/content/en/find-smallest-number/initial.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
def smallest_number(numbers): | ||
smallest = numbers[0] | ||
for num in numbers: | ||
if num < smallest: | ||
smallest = num | ||
return smallest |
6 changes: 6 additions & 0 deletions
6
codewof/programming/content/en/find-smallest-number/question.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Find Smallest Number | ||
|
||
The following function `smallest_number(numbers)` takes a list `numbers` as an argument and should return the smallest | ||
number in the list. | ||
|
||
This function looks like it should work, but there are problems with it. Find the bug (or bugs) to fix the function. |
6 changes: 6 additions & 0 deletions
6
codewof/programming/content/en/find-smallest-number/solution.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
def smallest_number(numbers): | ||
smallest = numbers[0] | ||
for num in numbers: | ||
if num < smallest: | ||
smallest = num | ||
return smallest |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/find-smallest-number/test-case-1-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print(smallest_number([3, 5, 6, 7, 4, 2])) |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/find-smallest-number/test-case-1-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2 |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/find-smallest-number/test-case-2-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print(smallest_number([4, 5, 8, 3, 2, 1])) |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/find-smallest-number/test-case-2-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/find-smallest-number/test-case-3-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print(smallest_number([-1, 2, 3, 4, 5])) |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/find-smallest-number/test-case-3-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-1 |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/find-smallest-number/test-case-4-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print(smallest_number([10, 4, 18, 5, 187])) |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/find-smallest-number/test-case-4-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4 |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/find-smallest-number/test-case-5-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print(smallest_number([-10, -20, -30, -18, -4])) |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/find-smallest-number/test-case-5-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#Good Password | ||
|
||
Write a program that asks the user for a password in order to check if it meets the requirements for a password. For | ||
the purposes of this question, a password is good enough if it is at least 5 characters long. | ||
|
||
If the password meets the requirements then print `Thank you, your password is good enough`, otherwise print | ||
`No, this password is not good enough`. Keep asking the user for a password until they enter one that meets the requirements. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
password = input("What is the password? ") | ||
while len(password) < 5: | ||
print("No, this password is not good enough") | ||
password = input("What is the password? ") | ||
print("Thank you, your password is good enough") |
7 changes: 7 additions & 0 deletions
7
codewof/programming/content/en/good-password/test-case-1-input.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
add | ||
fall | ||
join | ||
name | ||
off | ||
on | ||
after |
7 changes: 7 additions & 0 deletions
7
codewof/programming/content/en/good-password/test-case-1-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
No, this password is not good enough | ||
No, this password is not good enough | ||
No, this password is not good enough | ||
No, this password is not good enough | ||
No, this password is not good enough | ||
No, this password is not good enough | ||
Thank you, your password is good enough |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/good-password/test-case-2-input.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
holiday |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/good-password/test-case-2-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Thank you, your password is good enough |
2 changes: 2 additions & 0 deletions
2
codewof/programming/content/en/good-password/test-case-3-input.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
job | ||
minute |
2 changes: 2 additions & 0 deletions
2
codewof/programming/content/en/good-password/test-case-3-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
No, this password is not good enough | ||
Thank you, your password is good enough |
5 changes: 5 additions & 0 deletions
5
codewof/programming/content/en/good-password/test-case-4-input.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
map | ||
open | ||
page | ||
put | ||
whiteboard |
5 changes: 5 additions & 0 deletions
5
codewof/programming/content/en/good-password/test-case-4-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
No, this password is not good enough | ||
No, this password is not good enough | ||
No, this password is not good enough | ||
No, this password is not good enough | ||
Thank you, your password is good enough |
4 changes: 4 additions & 0 deletions
4
codewof/programming/content/en/good-password/test-case-5-input.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
neck | ||
knee | ||
head | ||
structure |
4 changes: 4 additions & 0 deletions
4
codewof/programming/content/en/good-password/test-case-5-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
No, this password is not good enough | ||
No, this password is not good enough | ||
No, this password is not good enough | ||
Thank you, your password is good enough |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Reverse String | ||
|
||
Write a function `reverse_string(string)` that takes the string, `string`, and prints the string in reverse. | ||
|
||
For example, if we call `reverse_string('Mountain')` the output should be: | ||
niatnuoM | ||
|
||
*Hint: the* `range` *function could be useful* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
def reverse_string(string): | ||
reverse = '' | ||
for char in range(len(string) - 1, -1, -1): | ||
reverse += string[char] | ||
print(reverse) |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/reverse-string/test-case-1-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
reverse_string('Mountain') |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/reverse-string/test-case-1-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
niatnuoM |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/reverse-string/test-case-2-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
reverse_string('I love Python') |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/reverse-string/test-case-2-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nohtyP evol I |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/reverse-string/test-case-3-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
reverse_string('') |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#Rotate Words | ||
|
||
Write a program that asks the user for some words and prints out the words vertically rather | ||
than horizontally. If the user inputs the string `Example` then your program should print: | ||
|
||
``` | ||
E | ||
x | ||
a | ||
m | ||
p | ||
l | ||
e | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
words = input("Words please: ") | ||
for char in words: | ||
print(char) |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/rotate-words/test-case-1-input.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Example |
7 changes: 7 additions & 0 deletions
7
codewof/programming/content/en/rotate-words/test-case-1-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
E | ||
x | ||
a | ||
m | ||
p | ||
l | ||
e |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/rotate-words/test-case-2-input.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello-World! |
12 changes: 12 additions & 0 deletions
12
codewof/programming/content/en/rotate-words/test-case-2-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
H | ||
e | ||
l | ||
l | ||
o | ||
- | ||
W | ||
o | ||
r | ||
l | ||
d | ||
! |
Empty file.
Empty file.
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/rotate-words/test-case-4-input.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Testing-testing... |
18 changes: 18 additions & 0 deletions
18
codewof/programming/content/en/rotate-words/test-case-4-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
T | ||
e | ||
s | ||
t | ||
i | ||
n | ||
g | ||
- | ||
t | ||
e | ||
s | ||
t | ||
i | ||
n | ||
g | ||
. | ||
. | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Say hello! | ||
# Say Hello! | ||
|
||
Write a program that prints `Hello world!`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#Shopping List | ||
|
||
Write a function `print_shopping_list(shopping_list)` that takes a list `shopping_list` and prints each item on a new | ||
line with a checkbox `[]` made of square brackets in front of it. For example, calling | ||
`print_shopping_list(['Spinach', 'Chickpeas'])` should print: | ||
``` | ||
[] Spinach | ||
[] Chickpeas | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
def print_shopping_list(shopping_list): | ||
for item in shopping_list: | ||
print("[] " + item) |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/shopping-list/test-case-1-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print_shopping_list(['Apples', 'Bananas', 'Taro']) |
3 changes: 3 additions & 0 deletions
3
codewof/programming/content/en/shopping-list/test-case-1-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[] Apples | ||
[] Bananas | ||
[] Taro |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/shopping-list/test-case-2-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print_shopping_list(['Oranges', 'Cereal', 'Broccoli', 'Gold Kumara']) |
4 changes: 4 additions & 0 deletions
4
codewof/programming/content/en/shopping-list/test-case-2-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[] Oranges | ||
[] Cereal | ||
[] Broccoli | ||
[] Gold Kumara |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/shopping-list/test-case-3-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print_shopping_list(['Bread', 'Mushrooms']) |
2 changes: 2 additions & 0 deletions
2
codewof/programming/content/en/shopping-list/test-case-3-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[] Bread | ||
[] Mushrooms |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/shopping-list/test-case-4-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print_shopping_list(['Onions', 'Garlic', 'Capsicum', 'Pineapple']) |
4 changes: 4 additions & 0 deletions
4
codewof/programming/content/en/shopping-list/test-case-4-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[] Onions | ||
[] Garlic | ||
[] Capsicum | ||
[] Pineapple |
14 changes: 14 additions & 0 deletions
14
codewof/programming/content/en/triangle-pattern/question.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Triangle Pattern | ||
|
||
Write a function `triangle(x)` that takes an integer `x` and prints out a triangle (made up of `*` symbols) of depth `x`. | ||
For example if we call `triangle(5)` we would expect the output to be: | ||
|
||
``` | ||
* | ||
** | ||
*** | ||
**** | ||
***** | ||
``` | ||
|
||
If `x` is less than 1 (inlcusive), your function should print `That isn't a triangle!` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
def triangle(x): | ||
if x <= 1: | ||
print("That isn't a triangle!") | ||
else: | ||
for i in range(1, x+1): | ||
print(i * '*') |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/triangle-pattern/test-case-1-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
triangle(5) |
5 changes: 5 additions & 0 deletions
5
codewof/programming/content/en/triangle-pattern/test-case-1-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
* | ||
** | ||
*** | ||
**** | ||
***** |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/triangle-pattern/test-case-2-code.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
triangle(1) |
1 change: 1 addition & 0 deletions
1
codewof/programming/content/en/triangle-pattern/test-case-2-output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
That isn't a triangle! |
Oops, something went wrong.