Expand on it
def Complicated_Greetings(name): Hello = f'{chr(72)}{chr(101)}{2 * chr(108)}{chr(111)}' comma = f'{chr(44)}{chr(32)}' World = f'{chr(87)}{chr(111)}{chr(114)}{chr(108)}{chr(100)}{2 * chr(33)}' return Hello + " "+ name if name else Hello+comma+World
print(f'{chr(72)}{chr(101)}{2 * chr(108)}{chr(111)}{chr(44)}{chr(32)}{chr(87)}{chr(111)}{chr(114)}{chr(108)}{chr(100)}{2 * chr(33)}')- def Complicated_Greetings(name):
- Hello = f'{chr(72)}{chr(101)}{2 * chr(108)}{chr(111)}'
- comma = f'{chr(44)}{chr(32)}'
- World = f'{chr(87)}{chr(111)}{chr(114)}{chr(108)}{chr(100)}{2 * chr(33)}'
- return Hello + " "+ name if name else Hello+comma+World
import codewars_test as test # TODO Write tests import solution # or from solution import example # test.assert_equals(actual, expected, [optional] message) @test.describe("Brand New Triple A RPG Game") def test_group(): @test.it("Check with name") def test_case(): test.assert_equals(Complicated_Greetings("Femi"), "Hello Femi") @test.it("Check without name") def test_case(): test.assert_equals(Complicated_Greetings(""), "Hello, World!!")
- import codewars_test as test
- # TODO Write tests
- import solution # or from solution import example
- # test.assert_equals(actual, expected, [optional] message)
- @test.describe("Brand New Triple A RPG Game")
- def test_group():
@test.it("Hello?")- @test.it("Check with name")
- def test_case():
test.assert_equals(1 + 1, 2)- test.assert_equals(Complicated_Greetings("Femi"), "Hello Femi")
- @test.it("Check without name")
- def test_case():
- test.assert_equals(Complicated_Greetings(""), "Hello, World!!")