def func_thirteen(another_calc_dec,molar_mass): form_another_calc = format_input(another_calc_dec) while form_another_calc not in ['quit','yes']: print("I'm sorry, but I did not understand that. \ Please try again. " + '\n') another_calc_dec = func_twelve() form_another_calc = format_input(another_calc_dec) continue if form_another_calc == 'quit': sys.exit() else: calc_cleaned = func_nine() calc_cleaned = func_nine_a(calc_cleaned) calc_cleaned = func_ten(calc_cleaned) calc_cleaned = func_ten_a(calc_cleaned) answer = func_eleven(calc_cleaned, molar_mass) another_calc_dec = func_twelve() func_thirteen(another_calc_dec,molar_mass)
def func_thirteen(another_calc_dec, molar_mass): form_another_calc = format_input(another_calc_dec) while form_another_calc not in ['quit', 'yes']: print("I'm sorry, but I did not understand that. \ Please try again. " + '\n') another_calc_dec = func_twelve() form_another_calc = format_input(another_calc_dec) continue if form_another_calc == 'quit': sys.exit() else: calc_cleaned = func_nine() calc_cleaned = func_nine_a(calc_cleaned) calc_cleaned = func_ten(calc_cleaned) calc_cleaned = func_ten_a(calc_cleaned) answer = func_eleven(calc_cleaned, molar_mass) another_calc_dec = func_twelve() func_thirteen(another_calc_dec, molar_mass)
def func_four(): numbers = get_numbers() numbers_stripped = rem_comm_spaces(numbers) num_only = only_num(numbers_stripped) while num_only == False: numbers = format_input(numbers) if numbers == 'quit': sys.exit() else: print("I'm sorry, but you seem to have entered \ a letter, an invalid punctuation mark, or the empty string. \ Please try again." + '\n') numbers = get_numbers() numbers_stripped = rem_comm_spaces(numbers) num_only = only_num(numbers_stripped) continue return numbers
def test_one(self): self.assertEqual(format_input('fs FSE, sljf ,'), 'fsfse,sljf,')
def func_two(elements): elements_formatted = format_input(elements) if elements_formatted == 'quit': sys.exit() else: return elements_formatted
def test_one(self): self.assertEqual(format_input('fs FSE, sljf ,'),'fsfse,sljf,')