コード例 #1
0
ファイル: hw4_tests.py プロジェクト: sdeath666/homeworks
def tests_for_hw4_solution1():
    """Simple tests for task01 PyBursa HW4"""
    assert task01("ABCda") == {'a': 40.0, 'c': 20.0, 'b': 20.0, 'd': 20.0}
コード例 #2
0
ファイル: hw4_starter.py プロジェクト: sdeath666/homeworks
#!/usr/bin/env python2
# coding=utf-8
"""
Starting file for PyBursa HW4
"""
from hw4_solution1 import task01
from hw4_solution2 import task02

if __name__ == '__main__':
    text = "Proin eget tortor risus. Cras ultricies ligula sed magna dictum porta. " \
           "Donec rutrum congue leo eget malesuada."
    print task01(text)
    print task01("ABCda")
    text = "Proin eget tortor risus."
    print task02(text, 24)
    print task02(text, 23)
    print task02(text, 13)
    print task02(text, 6)

コード例 #3
0
ファイル: hw4_starter.py プロジェクト: wearvolff/homeworks
#!/usr/bin/env python2
# coding=utf-8
"""
Starting file for PyBursa HW4
"""
from hw4_solution1 import task01
from hw4_solution2 import task02

if __name__ == "__main__":
    text = (
        "Proin eget tortor risus. Cras ultricies ligula sed magna dictum porta. "
        "Donec rutrum congue leo eget malesuada."
    )
    print task01(text)
    print task01("ABCda")
    text = "Proin eget tortor risus."
    print task02(text, 24)
    print task02(text, 23)
    print task02(text, 13)
    print task02(text, 6)
コード例 #4
0
ファイル: hw4_tests.py プロジェクト: wearvolff/homeworks
def tests_for_hw4_solution1():
    """Simple tests for task01 PyBursa HW4"""
    assert task01("ABCda") == {"a": 40.0, "c": 20.0, "b": 20.0, "d": 20.0}