this code is given two variables, width and the height of a rectangle, returns area and perimeter. fork and make this code better.
test.
def sq(width,height):
perimeter = width + width + height + height
area = perimeter * perimeter - 7 * width * height - 4 * width * width - 4 * height * height
return [area,perimeter]
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(sq(5,4), [20,18])
test.assert_equals(sq(2,3), [6,10])
test.assert_equals(sq(10,10), [100,40])