def test_is_strobogrammatic2(self): self.assertTrue(is_strobogrammatic2("69")) self.assertFalse(is_strobogrammatic2("14"))
""" A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function to determine if a number is strobogrammatic. The number is represented as a string. For example, the numbers "69", "88", and "818" are all strobogrammatic. """ from algorithms.maths import is_strobogrammatic, is_strobogrammatic2 print(is_strobogrammatic("69")) print(is_strobogrammatic2("69"))