예제 #1
0
 def test_is_strobogrammatic(self):
     self.assertTrue(is_strobogrammatic("69"))
     self.assertFalse(is_strobogrammatic("14"))
예제 #2
0
 def test_is_strobogrammatic(self):
     self.assertTrue(is_strobogrammatic("69"))
     self.assertFalse(is_strobogrammatic("14"))
예제 #3
0
"""
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"))