Exemplo n.º 1
0
def func_one():
    elements = get_elements()
    elements_stripped = rem_comm_spaces(elements)
    alpha_only = only_alpha(elements_stripped)
    while alpha_only == False:
        print('\n')
        print("I'm sorry, but you seem to have entered \
a numerical value, invalid punctuation mark, or the empty string. \
Please try again." + '\n')
        elements = get_elements()
        elements_stripped = rem_comm_spaces(elements)
        alpha_only = only_alpha(elements_stripped)
        continue
    return elements
Exemplo n.º 2
0
def func_one():
    elements = get_elements()
    elements_stripped = rem_comm_spaces(elements)
    alpha_only = only_alpha(elements_stripped)
    while alpha_only == False:
        print('\n')
        print("I'm sorry, but you seem to have entered \
a numerical value, invalid punctuation mark, or the empty string. \
Please try again." + '\n')
        elements = get_elements()
        elements_stripped = rem_comm_spaces(elements)
        alpha_only = only_alpha(elements_stripped)
        continue
    return elements
Exemplo n.º 3
0
 def test_four(self):
     self.assertTrue(only_alpha('fsFGSDF'))
Exemplo n.º 4
0
 def test_three(self):
     self.assertFalse(only_alpha('!?sdfdsf$'))
Exemplo n.º 5
0
 def test_two(self):
     self.assertFalse(only_alpha('fhe34sJ'))
Exemplo n.º 6
0
 def test_one(self):
     self.assertFalse(only_alpha(''))
Exemplo n.º 7
0
 def test_four(self):
     self.assertTrue(only_alpha('fsFGSDF'))
Exemplo n.º 8
0
 def test_three(self):
     self.assertFalse(only_alpha('!?sdfdsf$'))
Exemplo n.º 9
0
 def test_two(self):
     self.assertFalse(only_alpha('fhe34sJ'))
Exemplo n.º 10
0
 def test_one(self):
     self.assertFalse(only_alpha(''))