kyu_6.your_order_please package
Submodules
kyu_6.your_order_please.order module
Solution for -> Your order, please.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- kyu_6.your_order_please.order.order(sentence: str) str[source]
Sort a given string by rules listed below.
Each word in the string will contain a single number. This number is the position the word should have in the result.
Note: Numbers can be from 1 to 9. So 1 will be the first word (not 0).
If the input string is empty, return an empty string. The words in the input String will only contain valid consecutive numbers.
- Parameters:
sentence – Each word in the string will contain a single number
- Returns:
sorted string
kyu_6.your_order_please.test_order module
Test for -> Your order, please.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- class kyu_6.your_order_please.test_order.OrderTestCase(methodName='runTest')[source]
Bases:
TestCaseTesting ‘order’ function.
- _classSetupFailed = False
- _class_cleanups = []
- test_order = None
- test_order_0_is2_Thi1s_T4est_3a(**kw)
Testing ‘order’ function with various test data [with sentence=’is2 Thi1s T4est 3a’, expected=’Thi1s is2 3a T4est’].
Your task is to verify that ‘order’ function sorts a given string by following rules:
1. Each word in the string will contain a single number. This number is the position the word should have in the result.
2. Note: Numbers can be from 1 to 9. So 1 will be the first word (not 0).
3. If the input string is empty, return an empty string. The words in the input String will only contain valid consecutive numbers. :return:
- test_order_1_4of_Fo1r_pe6ople_g3ood_th5e_the2(**kw)
Testing ‘order’ function with various test data [with sentence=’4of Fo1r pe6ople g3ood th5e the2’, expected=’Fo1r the2 g3ood 4of th5e pe6ople’].
Your task is to verify that ‘order’ function sorts a given string by following rules:
1. Each word in the string will contain a single number. This number is the position the word should have in the result.
2. Note: Numbers can be from 1 to 9. So 1 will be the first word (not 0).
3. If the input string is empty, return an empty string. The words in the input String will only contain valid consecutive numbers. :return:
- test_order_2_(**kw)
Testing ‘order’ function with various test data [with sentence=’’, expected=’’].
Your task is to verify that ‘order’ function sorts a given string by following rules:
1. Each word in the string will contain a single number. This number is the position the word should have in the result.
2. Note: Numbers can be from 1 to 9. So 1 will be the first word (not 0).
3. If the input string is empty, return an empty string. The words in the input String will only contain valid consecutive numbers. :return:
Module contents
Your order, please.