コード例 #1
0
def func_nine():
    calc = what_calc()
    calc_cleaned = clean_what_calc(calc)
    alpha_bool_value = is_alpha(calc_cleaned)
    while alpha_bool_value == False:
        print("I'm sorry, but you have entered a number, \
a punctuation mark, or the empty string. Please try again" + '\n')
        calc = what_calc()
        calc_cleaned = clean_what_calc(calc)
        alpha_bool_value = is_alpha(calc_cleaned)
        continue
        return calc_cleaned
    return calc_cleaned
コード例 #2
0
ファイル: molar_conversion.py プロジェクト: mclement1/csc221
def func_nine():
    calc = what_calc()
    calc_cleaned = clean_what_calc(calc)
    alpha_bool_value = is_alpha(calc_cleaned)
    while alpha_bool_value == False:
        print("I'm sorry, but you have entered a number, \
a punctuation mark, or the empty string. Please try again" + '\n')
        calc = what_calc()
        calc_cleaned = clean_what_calc(calc)
        alpha_bool_value = is_alpha(calc_cleaned)
        continue
        return calc_cleaned
    return calc_cleaned
コード例 #3
0
 def test_one(self):
     self.assertEqual(clean_what_calc('  f,d,g  .dfs '), 'f,d,g.dfs')
コード例 #4
0
 def test_one(self):
     self.assertEqual(clean_what_calc('  f,d,g  .dfs '),'f,d,g.dfs')