From de66a31bb7100ebcb2b19c0bec54184ce61ffdd8 Mon Sep 17 00:00:00 2001 From: PHeanEX Date: Sun, 12 Mar 2017 15:13:28 +0100 Subject: [PATCH] Add skeleton files for exercises (#415) closes #272 --- exercises/accumulate/accumulate.py | 2 + exercises/acronym/acronym.py | 2 + exercises/allergies/allergies.py | 3 ++ exercises/allergies/example.py | 2 +- exercises/anagram/anagram.py | 2 + exercises/atbash-cipher/atbash_cipher.py | 6 +++ exercises/beer-song/beer_song.py | 6 +++ exercises/binary-search/binary_search.py | 2 + exercises/binary/binary.py | 2 + exercises/bob/bob.py | 10 +---- exercises/bracket-push/bracket_push.py | 2 + exercises/circular-buffer/circular_buffer.py | 11 +++++ exercises/clock/clock.py | 3 ++ exercises/clock/example.py | 2 +- exercises/crypto-square/crypto_square.py | 2 + exercises/diamond/diamond.py | 2 + .../difference_of_squares.py | 10 +++++ exercises/etl/etl.py | 2 + exercises/flatten-array/flatten_array.py | 2 + exercises/gigasecond/gigasecond.py | 2 + exercises/grade-school/grade_school.py | 3 ++ exercises/grains/grains.py | 6 +++ exercises/hamming/hamming.py | 2 + exercises/hello-world/hello_world.py | 9 +---- exercises/hexadecimal/hexadecimal.py | 2 + exercises/house/house.py | 6 +++ .../kindergarten_garden.py | 3 ++ .../largest_series_product.py | 2 + exercises/leap/leap.py | 2 + exercises/linked-list/linked_list.py | 10 +---- exercises/list-ops/list_ops.py | 40 +++++++++---------- exercises/luhn/luhn.py | 3 ++ exercises/matrix/matrix.py | 3 ++ exercises/meetup/meetup.py | 2 + exercises/minesweeper/minesweeper.py | 2 + exercises/nth-prime/nth_prime.py | 2 + .../nucleotide-count/nucleotide_count.py | 6 +++ exercises/ocr-numbers/ocr_numbers.py | 6 +++ .../{ocr_test.py => ocr_numbers_test.py} | 0 exercises/octal/octal.py | 2 + .../palindrome_products.py | 6 +++ exercises/pangram/pangram.py | 2 + .../pascals-triangle/pascals_triangle.py | 10 +++++ exercises/perfect-numbers/perfect_numbers.py | 6 +++ exercises/phone-number/phone_number.py | 3 ++ exercises/pig-latin/pig_latin.py | 2 + exercises/point-mutations/point_mutations.py | 2 + exercises/poker/poker.py | 2 + exercises/prime-factors/prime_factors.py | 2 + exercises/proverb/proverb.py | 2 + .../pythagorean_triplet.py | 10 +++++ exercises/queen-attack/queen_attack.py | 6 +++ .../rail-fence-cipher/rail_fence_cipher.py | 10 +++++ exercises/raindrops/raindrops.py | 2 + exercises/rectangles/example.py | 2 +- exercises/rectangles/rectangles.py | 2 + ...ngles_count_test.py => rectangles_test.py} | 0 .../rna-transcription/rna_transcription.py | 2 + exercises/robot-name/robot_name.py | 3 ++ exercises/robot-simulator/robot_simulator.py | 3 ++ exercises/roman-numerals/roman_numerals.py | 2 + .../run_length_encoding.py | 6 +++ ...th_test.py => run_length_encoding_test.py} | 2 +- exercises/saddle-points/saddle_points.py | 2 + exercises/say/say.py | 2 + exercises/scrabble-score/scrabble_score.py | 2 + .../secret-handshake/secret_handshake.py | 6 +++ ...shake_test.py => secret_handshake_test.py} | 0 exercises/series/series.py | 2 + exercises/sieve/sieve.py | 2 + exercises/simple-cipher/example.py | 2 +- exercises/simple-cipher/simple_cipher.py | 8 ++++ exercises/space-age/space_age.py | 3 ++ exercises/strain/strain.py | 6 +++ exercises/sublist/sublist.py | 2 + .../sum-of-multiples/sum_of_multiples.py | 2 + exercises/triangle/triangle.py | 7 ++++ exercises/trinary/trinary.py | 2 + exercises/twelve-days/twelve_days.py | 10 +++++ exercises/word-count/word_count.py | 2 + exercises/wordy/wordy.py | 2 + exercises/zebra-puzzle/zebra_puzzle.py | 2 + 82 files changed, 287 insertions(+), 50 deletions(-) create mode 100644 exercises/accumulate/accumulate.py create mode 100644 exercises/acronym/acronym.py create mode 100644 exercises/allergies/allergies.py create mode 100644 exercises/anagram/anagram.py create mode 100644 exercises/atbash-cipher/atbash_cipher.py create mode 100644 exercises/beer-song/beer_song.py create mode 100644 exercises/binary-search/binary_search.py create mode 100644 exercises/binary/binary.py create mode 100644 exercises/bracket-push/bracket_push.py create mode 100644 exercises/circular-buffer/circular_buffer.py create mode 100644 exercises/clock/clock.py create mode 100644 exercises/crypto-square/crypto_square.py create mode 100644 exercises/diamond/diamond.py create mode 100644 exercises/difference-of-squares/difference_of_squares.py create mode 100644 exercises/etl/etl.py create mode 100644 exercises/flatten-array/flatten_array.py create mode 100644 exercises/gigasecond/gigasecond.py create mode 100644 exercises/grade-school/grade_school.py create mode 100644 exercises/grains/grains.py create mode 100644 exercises/hamming/hamming.py create mode 100644 exercises/hexadecimal/hexadecimal.py create mode 100644 exercises/house/house.py create mode 100644 exercises/kindergarten-garden/kindergarten_garden.py create mode 100644 exercises/largest-series-product/largest_series_product.py create mode 100644 exercises/leap/leap.py create mode 100644 exercises/luhn/luhn.py create mode 100644 exercises/matrix/matrix.py create mode 100644 exercises/meetup/meetup.py create mode 100644 exercises/minesweeper/minesweeper.py create mode 100644 exercises/nth-prime/nth_prime.py create mode 100644 exercises/nucleotide-count/nucleotide_count.py create mode 100644 exercises/ocr-numbers/ocr_numbers.py rename exercises/ocr-numbers/{ocr_test.py => ocr_numbers_test.py} (100%) create mode 100644 exercises/octal/octal.py create mode 100644 exercises/palindrome-products/palindrome_products.py create mode 100644 exercises/pangram/pangram.py create mode 100644 exercises/pascals-triangle/pascals_triangle.py create mode 100644 exercises/perfect-numbers/perfect_numbers.py create mode 100644 exercises/phone-number/phone_number.py create mode 100644 exercises/pig-latin/pig_latin.py create mode 100644 exercises/point-mutations/point_mutations.py create mode 100644 exercises/poker/poker.py create mode 100644 exercises/prime-factors/prime_factors.py create mode 100644 exercises/proverb/proverb.py create mode 100644 exercises/pythagorean-triplet/pythagorean_triplet.py create mode 100644 exercises/queen-attack/queen_attack.py create mode 100644 exercises/rail-fence-cipher/rail_fence_cipher.py create mode 100644 exercises/raindrops/raindrops.py create mode 100644 exercises/rectangles/rectangles.py rename exercises/rectangles/{rectangles_count_test.py => rectangles_test.py} (100%) create mode 100644 exercises/rna-transcription/rna_transcription.py create mode 100644 exercises/robot-name/robot_name.py create mode 100644 exercises/robot-simulator/robot_simulator.py create mode 100644 exercises/roman-numerals/roman_numerals.py create mode 100644 exercises/run-length-encoding/run_length_encoding.py rename exercises/run-length-encoding/{run_length_test.py => run_length_encoding_test.py} (95%) create mode 100644 exercises/saddle-points/saddle_points.py create mode 100644 exercises/say/say.py create mode 100644 exercises/scrabble-score/scrabble_score.py create mode 100644 exercises/secret-handshake/secret_handshake.py rename exercises/secret-handshake/{handshake_test.py => secret_handshake_test.py} (100%) create mode 100644 exercises/series/series.py create mode 100644 exercises/sieve/sieve.py create mode 100644 exercises/simple-cipher/simple_cipher.py create mode 100644 exercises/space-age/space_age.py create mode 100644 exercises/strain/strain.py create mode 100644 exercises/sublist/sublist.py create mode 100644 exercises/sum-of-multiples/sum_of_multiples.py create mode 100644 exercises/triangle/triangle.py create mode 100644 exercises/trinary/trinary.py create mode 100644 exercises/twelve-days/twelve_days.py create mode 100644 exercises/word-count/word_count.py create mode 100644 exercises/wordy/wordy.py create mode 100644 exercises/zebra-puzzle/zebra_puzzle.py diff --git a/exercises/accumulate/accumulate.py b/exercises/accumulate/accumulate.py new file mode 100644 index 0000000000..741fb58b99 --- /dev/null +++ b/exercises/accumulate/accumulate.py @@ -0,0 +1,2 @@ +def accumulate(): + pass diff --git a/exercises/acronym/acronym.py b/exercises/acronym/acronym.py new file mode 100644 index 0000000000..5598265430 --- /dev/null +++ b/exercises/acronym/acronym.py @@ -0,0 +1,2 @@ +def abbreviate(): + pass diff --git a/exercises/allergies/allergies.py b/exercises/allergies/allergies.py new file mode 100644 index 0000000000..9c8934edcd --- /dev/null +++ b/exercises/allergies/allergies.py @@ -0,0 +1,3 @@ +class Allergies(object): + def __init__(self): + pass diff --git a/exercises/allergies/example.py b/exercises/allergies/example.py index 597482511e..2e4bb090de 100644 --- a/exercises/allergies/example.py +++ b/exercises/allergies/example.py @@ -1,4 +1,4 @@ -class Allergies: +class Allergies(object): _allergies = [ "eggs", diff --git a/exercises/anagram/anagram.py b/exercises/anagram/anagram.py new file mode 100644 index 0000000000..c23ccd710b --- /dev/null +++ b/exercises/anagram/anagram.py @@ -0,0 +1,2 @@ +def detect_anagrams(): + pass diff --git a/exercises/atbash-cipher/atbash_cipher.py b/exercises/atbash-cipher/atbash_cipher.py new file mode 100644 index 0000000000..2536c2e670 --- /dev/null +++ b/exercises/atbash-cipher/atbash_cipher.py @@ -0,0 +1,6 @@ +def encode(): + pass + + +def decode(): + pass diff --git a/exercises/beer-song/beer_song.py b/exercises/beer-song/beer_song.py new file mode 100644 index 0000000000..549c5bb9c5 --- /dev/null +++ b/exercises/beer-song/beer_song.py @@ -0,0 +1,6 @@ +def verse(): + pass + + +def song(): + pass diff --git a/exercises/binary-search/binary_search.py b/exercises/binary-search/binary_search.py new file mode 100644 index 0000000000..19e630d5f6 --- /dev/null +++ b/exercises/binary-search/binary_search.py @@ -0,0 +1,2 @@ +def binary_search(): + pass diff --git a/exercises/binary/binary.py b/exercises/binary/binary.py new file mode 100644 index 0000000000..e1f4ca6cdf --- /dev/null +++ b/exercises/binary/binary.py @@ -0,0 +1,2 @@ +def parse_binary(): + pass diff --git a/exercises/bob/bob.py b/exercises/bob/bob.py index 0c4661af05..5221e0ec65 100644 --- a/exercises/bob/bob.py +++ b/exercises/bob/bob.py @@ -1,8 +1,2 @@ -# -# Skeleton file for the Python "Bob" exercise. -# - - -def hey(what): - - return +def hey(): + pass diff --git a/exercises/bracket-push/bracket_push.py b/exercises/bracket-push/bracket_push.py new file mode 100644 index 0000000000..f5e2d19f6a --- /dev/null +++ b/exercises/bracket-push/bracket_push.py @@ -0,0 +1,2 @@ +def check_brackets(): + pass diff --git a/exercises/circular-buffer/circular_buffer.py b/exercises/circular-buffer/circular_buffer.py new file mode 100644 index 0000000000..6a3c8f5f0d --- /dev/null +++ b/exercises/circular-buffer/circular_buffer.py @@ -0,0 +1,11 @@ +class BufferFullException(Exception): + pass + + +class BufferEmptyException(Exception): + pass + + +class CircularBuffer(object): + def __init__(self): + pass diff --git a/exercises/clock/clock.py b/exercises/clock/clock.py new file mode 100644 index 0000000000..45382ec82e --- /dev/null +++ b/exercises/clock/clock.py @@ -0,0 +1,3 @@ +class Clock(object): + def __init__(self): + pass diff --git a/exercises/clock/example.py b/exercises/clock/example.py index bbf39fd507..4b80c2f6a7 100644 --- a/exercises/clock/example.py +++ b/exercises/clock/example.py @@ -1,5 +1,5 @@ -class Clock: +class Clock(object): 'Clock that displays 24 hour clock that rollsover properly' def __init__(self, hour, minute): diff --git a/exercises/crypto-square/crypto_square.py b/exercises/crypto-square/crypto_square.py new file mode 100644 index 0000000000..c950e17e92 --- /dev/null +++ b/exercises/crypto-square/crypto_square.py @@ -0,0 +1,2 @@ +def encode(): + pass diff --git a/exercises/diamond/diamond.py b/exercises/diamond/diamond.py new file mode 100644 index 0000000000..5361e2f65c --- /dev/null +++ b/exercises/diamond/diamond.py @@ -0,0 +1,2 @@ +def make_diamond(): + pass diff --git a/exercises/difference-of-squares/difference_of_squares.py b/exercises/difference-of-squares/difference_of_squares.py new file mode 100644 index 0000000000..a255366df7 --- /dev/null +++ b/exercises/difference-of-squares/difference_of_squares.py @@ -0,0 +1,10 @@ +def square_of_sum(): + pass + + +def sum_of_squares(): + pass + + +def difference(): + pass diff --git a/exercises/etl/etl.py b/exercises/etl/etl.py new file mode 100644 index 0000000000..0dc913f72e --- /dev/null +++ b/exercises/etl/etl.py @@ -0,0 +1,2 @@ +def transform(): + pass diff --git a/exercises/flatten-array/flatten_array.py b/exercises/flatten-array/flatten_array.py new file mode 100644 index 0000000000..02485969f5 --- /dev/null +++ b/exercises/flatten-array/flatten_array.py @@ -0,0 +1,2 @@ +def flatten(): + pass diff --git a/exercises/gigasecond/gigasecond.py b/exercises/gigasecond/gigasecond.py new file mode 100644 index 0000000000..66d9978609 --- /dev/null +++ b/exercises/gigasecond/gigasecond.py @@ -0,0 +1,2 @@ +def add_gigasecond(): + pass diff --git a/exercises/grade-school/grade_school.py b/exercises/grade-school/grade_school.py new file mode 100644 index 0000000000..f620ed24ea --- /dev/null +++ b/exercises/grade-school/grade_school.py @@ -0,0 +1,3 @@ +class School(object): + def __init__(self): + pass diff --git a/exercises/grains/grains.py b/exercises/grains/grains.py new file mode 100644 index 0000000000..8c23e7eded --- /dev/null +++ b/exercises/grains/grains.py @@ -0,0 +1,6 @@ +def on_square(): + pass + + +def total_after(): + pass diff --git a/exercises/hamming/hamming.py b/exercises/hamming/hamming.py new file mode 100644 index 0000000000..f2bc5048be --- /dev/null +++ b/exercises/hamming/hamming.py @@ -0,0 +1,2 @@ +def distance(): + pass diff --git a/exercises/hello-world/hello_world.py b/exercises/hello-world/hello_world.py index bfcb36fa81..b13f0018a2 100644 --- a/exercises/hello-world/hello_world.py +++ b/exercises/hello-world/hello_world.py @@ -1,7 +1,2 @@ -# -# Skeleton file for the Python "Hello World" exercise. -# - - -def hello(name=''): - return +def hello(): + pass diff --git a/exercises/hexadecimal/hexadecimal.py b/exercises/hexadecimal/hexadecimal.py new file mode 100644 index 0000000000..f88d198f74 --- /dev/null +++ b/exercises/hexadecimal/hexadecimal.py @@ -0,0 +1,2 @@ +def hexa(): + pass diff --git a/exercises/house/house.py b/exercises/house/house.py new file mode 100644 index 0000000000..2d16b7f012 --- /dev/null +++ b/exercises/house/house.py @@ -0,0 +1,6 @@ +def verse(): + pass + + +def rhyme(): + pass diff --git a/exercises/kindergarten-garden/kindergarten_garden.py b/exercises/kindergarten-garden/kindergarten_garden.py new file mode 100644 index 0000000000..290aa5e6fc --- /dev/null +++ b/exercises/kindergarten-garden/kindergarten_garden.py @@ -0,0 +1,3 @@ +class Garden(object): + def __init__(self): + pass diff --git a/exercises/largest-series-product/largest_series_product.py b/exercises/largest-series-product/largest_series_product.py new file mode 100644 index 0000000000..8ea8d466bd --- /dev/null +++ b/exercises/largest-series-product/largest_series_product.py @@ -0,0 +1,2 @@ +def largest_product(): + pass diff --git a/exercises/leap/leap.py b/exercises/leap/leap.py new file mode 100644 index 0000000000..2ca6bbd321 --- /dev/null +++ b/exercises/leap/leap.py @@ -0,0 +1,2 @@ +def is_leap_year(): + pass diff --git a/exercises/linked-list/linked_list.py b/exercises/linked-list/linked_list.py index 5522126128..39d1e790a5 100644 --- a/exercises/linked-list/linked_list.py +++ b/exercises/linked-list/linked_list.py @@ -1,12 +1,6 @@ -# Skeleton file for the Python "linked-list" exercise. -# Implement the LinkedList class - - class Node(object): - def __init__(self, value, next=None, prev=None): - self.value = value - self.next = next - self.prev = prev + def __init__(self): + pass class LinkedList(object): diff --git a/exercises/list-ops/list_ops.py b/exercises/list-ops/list_ops.py index 12f2fe6e26..9c03405352 100644 --- a/exercises/list-ops/list_ops.py +++ b/exercises/list-ops/list_ops.py @@ -1,38 +1,34 @@ -# Please, do not use the built-in python functions like map, reduce, len, etc. -# that solve the same problems and try to solve it yourself instead. +def map_clone(): + pass -def map_clone(function, xs): - return xs +def length(): + pass -def length(xs): - return xs +def filter_clone(): + pass -def filter_clone(function, xs): - return xs +def reverse(): + pass -def reverse(xs): - return xs +def append(): + pass -def append(xs, y): - return xs +def foldl(): + pass -def foldl(function, xs, acc): - return xs +def foldr(): + pass -def foldr(function, xs, acc): - return xs +def flat(): + pass -def flat(xs): - return xs - - -def concat(xs, ys): - return xs +def concat(): + pass diff --git a/exercises/luhn/luhn.py b/exercises/luhn/luhn.py new file mode 100644 index 0000000000..c7bea9d96b --- /dev/null +++ b/exercises/luhn/luhn.py @@ -0,0 +1,3 @@ +class Luhn(object): + def __init__(self): + pass diff --git a/exercises/matrix/matrix.py b/exercises/matrix/matrix.py new file mode 100644 index 0000000000..d6b14b504e --- /dev/null +++ b/exercises/matrix/matrix.py @@ -0,0 +1,3 @@ +class Matrix(object): + def __init__(self): + pass diff --git a/exercises/meetup/meetup.py b/exercises/meetup/meetup.py new file mode 100644 index 0000000000..2ccfb8d5a7 --- /dev/null +++ b/exercises/meetup/meetup.py @@ -0,0 +1,2 @@ +def meetup_day(): + pass diff --git a/exercises/minesweeper/minesweeper.py b/exercises/minesweeper/minesweeper.py new file mode 100644 index 0000000000..1725caa97d --- /dev/null +++ b/exercises/minesweeper/minesweeper.py @@ -0,0 +1,2 @@ +def board(): + pass diff --git a/exercises/nth-prime/nth_prime.py b/exercises/nth-prime/nth_prime.py new file mode 100644 index 0000000000..70b6971fa3 --- /dev/null +++ b/exercises/nth-prime/nth_prime.py @@ -0,0 +1,2 @@ +def nth_prime(): + pass diff --git a/exercises/nucleotide-count/nucleotide_count.py b/exercises/nucleotide-count/nucleotide_count.py new file mode 100644 index 0000000000..77345aa837 --- /dev/null +++ b/exercises/nucleotide-count/nucleotide_count.py @@ -0,0 +1,6 @@ +def count(): + pass + + +def nucleotide_counts(): + pass diff --git a/exercises/ocr-numbers/ocr_numbers.py b/exercises/ocr-numbers/ocr_numbers.py new file mode 100644 index 0000000000..f67eac337e --- /dev/null +++ b/exercises/ocr-numbers/ocr_numbers.py @@ -0,0 +1,6 @@ +def number(): + pass + + +def grid(): + pass diff --git a/exercises/ocr-numbers/ocr_test.py b/exercises/ocr-numbers/ocr_numbers_test.py similarity index 100% rename from exercises/ocr-numbers/ocr_test.py rename to exercises/ocr-numbers/ocr_numbers_test.py diff --git a/exercises/octal/octal.py b/exercises/octal/octal.py new file mode 100644 index 0000000000..e82e1b9769 --- /dev/null +++ b/exercises/octal/octal.py @@ -0,0 +1,2 @@ +def parse_octal(): + pass diff --git a/exercises/palindrome-products/palindrome_products.py b/exercises/palindrome-products/palindrome_products.py new file mode 100644 index 0000000000..81d5fe506a --- /dev/null +++ b/exercises/palindrome-products/palindrome_products.py @@ -0,0 +1,6 @@ +def largest_palindrome(): + pass + + +def smallest_palindrome(): + pass diff --git a/exercises/pangram/pangram.py b/exercises/pangram/pangram.py new file mode 100644 index 0000000000..14eddbe1e2 --- /dev/null +++ b/exercises/pangram/pangram.py @@ -0,0 +1,2 @@ +def is_pangram(): + pass diff --git a/exercises/pascals-triangle/pascals_triangle.py b/exercises/pascals-triangle/pascals_triangle.py new file mode 100644 index 0000000000..58fae3ad75 --- /dev/null +++ b/exercises/pascals-triangle/pascals_triangle.py @@ -0,0 +1,10 @@ +def triangle(): + pass + + +def is_triangle(): + pass + + +def row(): + pass diff --git a/exercises/perfect-numbers/perfect_numbers.py b/exercises/perfect-numbers/perfect_numbers.py new file mode 100644 index 0000000000..7ec33bacdf --- /dev/null +++ b/exercises/perfect-numbers/perfect_numbers.py @@ -0,0 +1,6 @@ +def divisor_generator(): + pass + + +def is_perfect(): + pass diff --git a/exercises/phone-number/phone_number.py b/exercises/phone-number/phone_number.py new file mode 100644 index 0000000000..aa23f7533f --- /dev/null +++ b/exercises/phone-number/phone_number.py @@ -0,0 +1,3 @@ +class Phone(object): + def __init__(self): + pass diff --git a/exercises/pig-latin/pig_latin.py b/exercises/pig-latin/pig_latin.py new file mode 100644 index 0000000000..65d2de977c --- /dev/null +++ b/exercises/pig-latin/pig_latin.py @@ -0,0 +1,2 @@ +def translate(): + pass diff --git a/exercises/point-mutations/point_mutations.py b/exercises/point-mutations/point_mutations.py new file mode 100644 index 0000000000..928f7d890c --- /dev/null +++ b/exercises/point-mutations/point_mutations.py @@ -0,0 +1,2 @@ +def hamming_distance(): + pass diff --git a/exercises/poker/poker.py b/exercises/poker/poker.py new file mode 100644 index 0000000000..f210cc5bef --- /dev/null +++ b/exercises/poker/poker.py @@ -0,0 +1,2 @@ +def poker(): + pass diff --git a/exercises/prime-factors/prime_factors.py b/exercises/prime-factors/prime_factors.py new file mode 100644 index 0000000000..7a0bdbd012 --- /dev/null +++ b/exercises/prime-factors/prime_factors.py @@ -0,0 +1,2 @@ +def prime_factors(): + pass diff --git a/exercises/proverb/proverb.py b/exercises/proverb/proverb.py new file mode 100644 index 0000000000..d1be410c11 --- /dev/null +++ b/exercises/proverb/proverb.py @@ -0,0 +1,2 @@ +def proverb(): + pass diff --git a/exercises/pythagorean-triplet/pythagorean_triplet.py b/exercises/pythagorean-triplet/pythagorean_triplet.py new file mode 100644 index 0000000000..7fee30590b --- /dev/null +++ b/exercises/pythagorean-triplet/pythagorean_triplet.py @@ -0,0 +1,10 @@ +def primitive_triplets(): + pass + + +def triplets_in_range(): + pass + + +def is_triplet(): + pass diff --git a/exercises/queen-attack/queen_attack.py b/exercises/queen-attack/queen_attack.py new file mode 100644 index 0000000000..e4f8d9941a --- /dev/null +++ b/exercises/queen-attack/queen_attack.py @@ -0,0 +1,6 @@ +def board(): + pass + + +def can_attack(): + pass diff --git a/exercises/rail-fence-cipher/rail_fence_cipher.py b/exercises/rail-fence-cipher/rail_fence_cipher.py new file mode 100644 index 0000000000..c9857f7b27 --- /dev/null +++ b/exercises/rail-fence-cipher/rail_fence_cipher.py @@ -0,0 +1,10 @@ +def fence_pattern(): + pass + + +def encode(): + pass + + +def decode(): + pass diff --git a/exercises/raindrops/raindrops.py b/exercises/raindrops/raindrops.py new file mode 100644 index 0000000000..d2d3325b8f --- /dev/null +++ b/exercises/raindrops/raindrops.py @@ -0,0 +1,2 @@ +def raindrops(): + pass diff --git a/exercises/rectangles/example.py b/exercises/rectangles/example.py index 385bd8623d..819303f1c5 100644 --- a/exercises/rectangles/example.py +++ b/exercises/rectangles/example.py @@ -1,7 +1,7 @@ import itertools -class corners(): +class corners(object): def __init__(self, i, j): # i, j are position of corner self.i = i diff --git a/exercises/rectangles/rectangles.py b/exercises/rectangles/rectangles.py new file mode 100644 index 0000000000..c97f3d15bb --- /dev/null +++ b/exercises/rectangles/rectangles.py @@ -0,0 +1,2 @@ +def count(): + pass diff --git a/exercises/rectangles/rectangles_count_test.py b/exercises/rectangles/rectangles_test.py similarity index 100% rename from exercises/rectangles/rectangles_count_test.py rename to exercises/rectangles/rectangles_test.py diff --git a/exercises/rna-transcription/rna_transcription.py b/exercises/rna-transcription/rna_transcription.py new file mode 100644 index 0000000000..b7f4db8d42 --- /dev/null +++ b/exercises/rna-transcription/rna_transcription.py @@ -0,0 +1,2 @@ +def to_rna(): + pass diff --git a/exercises/robot-name/robot_name.py b/exercises/robot-name/robot_name.py new file mode 100644 index 0000000000..a288bdeba4 --- /dev/null +++ b/exercises/robot-name/robot_name.py @@ -0,0 +1,3 @@ +class Robot(object): + def __init__(self): + pass diff --git a/exercises/robot-simulator/robot_simulator.py b/exercises/robot-simulator/robot_simulator.py new file mode 100644 index 0000000000..a288bdeba4 --- /dev/null +++ b/exercises/robot-simulator/robot_simulator.py @@ -0,0 +1,3 @@ +class Robot(object): + def __init__(self): + pass diff --git a/exercises/roman-numerals/roman_numerals.py b/exercises/roman-numerals/roman_numerals.py new file mode 100644 index 0000000000..00a9536eac --- /dev/null +++ b/exercises/roman-numerals/roman_numerals.py @@ -0,0 +1,2 @@ +def numeral(): + pass diff --git a/exercises/run-length-encoding/run_length_encoding.py b/exercises/run-length-encoding/run_length_encoding.py new file mode 100644 index 0000000000..6419bfa561 --- /dev/null +++ b/exercises/run-length-encoding/run_length_encoding.py @@ -0,0 +1,6 @@ +def decode(): + pass + + +def encode(): + pass diff --git a/exercises/run-length-encoding/run_length_test.py b/exercises/run-length-encoding/run_length_encoding_test.py similarity index 95% rename from exercises/run-length-encoding/run_length_test.py rename to exercises/run-length-encoding/run_length_encoding_test.py index bba7cfad2b..efd06cdb5b 100644 --- a/exercises/run-length-encoding/run_length_test.py +++ b/exercises/run-length-encoding/run_length_encoding_test.py @@ -3,7 +3,7 @@ import unittest -from run_length import encode, decode +from run_length_encoding import encode, decode class WordCountTests(unittest.TestCase): diff --git a/exercises/saddle-points/saddle_points.py b/exercises/saddle-points/saddle_points.py new file mode 100644 index 0000000000..817a810be2 --- /dev/null +++ b/exercises/saddle-points/saddle_points.py @@ -0,0 +1,2 @@ +def saddle_points(): + pass diff --git a/exercises/say/say.py b/exercises/say/say.py new file mode 100644 index 0000000000..f323af8701 --- /dev/null +++ b/exercises/say/say.py @@ -0,0 +1,2 @@ +def say(): + pass diff --git a/exercises/scrabble-score/scrabble_score.py b/exercises/scrabble-score/scrabble_score.py new file mode 100644 index 0000000000..8f57fd38f3 --- /dev/null +++ b/exercises/scrabble-score/scrabble_score.py @@ -0,0 +1,2 @@ +def score(): + pass diff --git a/exercises/secret-handshake/secret_handshake.py b/exercises/secret-handshake/secret_handshake.py new file mode 100644 index 0000000000..71ada5ff59 --- /dev/null +++ b/exercises/secret-handshake/secret_handshake.py @@ -0,0 +1,6 @@ +def handshake(): + pass + + +def code(): + pass diff --git a/exercises/secret-handshake/handshake_test.py b/exercises/secret-handshake/secret_handshake_test.py similarity index 100% rename from exercises/secret-handshake/handshake_test.py rename to exercises/secret-handshake/secret_handshake_test.py diff --git a/exercises/series/series.py b/exercises/series/series.py new file mode 100644 index 0000000000..f955c12e84 --- /dev/null +++ b/exercises/series/series.py @@ -0,0 +1,2 @@ +def slices(): + pass diff --git a/exercises/sieve/sieve.py b/exercises/sieve/sieve.py new file mode 100644 index 0000000000..dff3aafa8d --- /dev/null +++ b/exercises/sieve/sieve.py @@ -0,0 +1,2 @@ +def sieve(): + pass diff --git a/exercises/simple-cipher/example.py b/exercises/simple-cipher/example.py index cd27c64660..e2497a73c1 100644 --- a/exercises/simple-cipher/example.py +++ b/exercises/simple-cipher/example.py @@ -3,7 +3,7 @@ import random -class Cipher: +class Cipher(object): def __init__(self, key=None): if not key: diff --git a/exercises/simple-cipher/simple_cipher.py b/exercises/simple-cipher/simple_cipher.py new file mode 100644 index 0000000000..6c7bbd1ad4 --- /dev/null +++ b/exercises/simple-cipher/simple_cipher.py @@ -0,0 +1,8 @@ +class Cipher(object): + def __init__(self): + pass + + +class Caesar(object): + def __init__(self): + pass diff --git a/exercises/space-age/space_age.py b/exercises/space-age/space_age.py new file mode 100644 index 0000000000..0ee2db60ca --- /dev/null +++ b/exercises/space-age/space_age.py @@ -0,0 +1,3 @@ +class SpaceAge(object): + def __init__(self): + pass diff --git a/exercises/strain/strain.py b/exercises/strain/strain.py new file mode 100644 index 0000000000..9e09a56f2d --- /dev/null +++ b/exercises/strain/strain.py @@ -0,0 +1,6 @@ +def keep(): + pass + + +def discard(): + pass diff --git a/exercises/sublist/sublist.py b/exercises/sublist/sublist.py new file mode 100644 index 0000000000..72468f9ca3 --- /dev/null +++ b/exercises/sublist/sublist.py @@ -0,0 +1,2 @@ +def check_lists(): + pass diff --git a/exercises/sum-of-multiples/sum_of_multiples.py b/exercises/sum-of-multiples/sum_of_multiples.py new file mode 100644 index 0000000000..73ceab9e7e --- /dev/null +++ b/exercises/sum-of-multiples/sum_of_multiples.py @@ -0,0 +1,2 @@ +def sum_of_multiples(): + pass diff --git a/exercises/triangle/triangle.py b/exercises/triangle/triangle.py new file mode 100644 index 0000000000..f9544b1e18 --- /dev/null +++ b/exercises/triangle/triangle.py @@ -0,0 +1,7 @@ +class TriangleError(Exception): + pass + + +class Triangle(object): + def __init__(self): + pass diff --git a/exercises/trinary/trinary.py b/exercises/trinary/trinary.py new file mode 100644 index 0000000000..cb41044110 --- /dev/null +++ b/exercises/trinary/trinary.py @@ -0,0 +1,2 @@ +def trinary(): + pass diff --git a/exercises/twelve-days/twelve_days.py b/exercises/twelve-days/twelve_days.py new file mode 100644 index 0000000000..0d17418086 --- /dev/null +++ b/exercises/twelve-days/twelve_days.py @@ -0,0 +1,10 @@ +def verse(): + pass + + +def verses(): + pass + + +def sing(): + pass diff --git a/exercises/word-count/word_count.py b/exercises/word-count/word_count.py new file mode 100644 index 0000000000..d1741341da --- /dev/null +++ b/exercises/word-count/word_count.py @@ -0,0 +1,2 @@ +def word_count(): + pass diff --git a/exercises/wordy/wordy.py b/exercises/wordy/wordy.py new file mode 100644 index 0000000000..e765101584 --- /dev/null +++ b/exercises/wordy/wordy.py @@ -0,0 +1,2 @@ +def calculate(): + pass diff --git a/exercises/zebra-puzzle/zebra_puzzle.py b/exercises/zebra-puzzle/zebra_puzzle.py new file mode 100644 index 0000000000..4d6454cdc2 --- /dev/null +++ b/exercises/zebra-puzzle/zebra_puzzle.py @@ -0,0 +1,2 @@ +def solution(): + pass