AveragePythonEnjoyervs.alanparmenter3 years ago
num to str
AveragePythonEnjoyervs.seraph7763 years ago
Hello World
exec(bytes('敭獳条㵥慬扭慤✺效汬潷汲Ⅴ℡‧','u16')[2:])
message = lambda: ''.join([chr(i) for i in [72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]])- exec(bytes('敭獳条㵥慬扭慤✺效汬潷汲Ⅴ℡‧','u16')[2:])
import codewars_test as test # TODO Write tests import solution # or from solution import example # test.assert_equals(actual, expected, [optional] message) .describe("Example") def test_group(): .it("test case") def test_case(): test.assert_equals(message(), "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("Example")
- def test_group():
- @test.it("test case")
- def test_case():
test.assert_equals(1 + 1, 2)- test.assert_equals(message(), "Hello world!!!")
AveragePythonEnjoyervs.BastienBD3 years ago
Convert Decimal to Binary
# Actually not using bin function))) convert_decimal_binary=lambda i: int(f"{i:b}")
def convert_decimal_binary(number: int) -> int:binary = []while number != 0:binary.append(number % 2)number //= 2binary.reverse()return int("".join(map(str, binary)))- # Actually not using bin function)))
- convert_decimal_binary=lambda i: int(f"{i:b}")
AveragePythonEnjoyervs.vikramnr3 years ago
Integer to table
Tables
Data Structures
AveragePythonEnjoyervs.pawptart4 years ago
Club's riddle
Fundamentals
Games