def run(): keep_going = True while keep_going: _print_welcome() base, height = _ask_for_arguments() _ask_for_type_of_triangle(base, height) keep_going = ask_to_continue('Le gustaría calcular otra área')
def run(): while True: welcome() lower, higher, comp = ask_for_ranges() run_comparison(lower, higher, comp) if not screen.ask_to_continue('Quieres volver a intentarlo'): break
def run(): while True: welcome() print_options() option = select_option() figure, requirements = ask_for_requirements(option) get_calculated_volume(figure, requirements) if not screen.ask_to_continue('Desea calcular otro volumen'): break
def run(): while True: welcome() option, conversion_option = ask_for_conversion_option() value = ask_for_value(option) conv_value = convert(value, conversion_option) show_converted_value(option, value, conv_value) print() if not screen.ask_to_continue('Desea hacer otra conversión'): break
def run(): while True: welcome_screen() games_to_win, max_games = quantity_of_plays_option() computer = play_against_computer() print( f'\nExcelente entonces gana el que tenga {games_to_win} puntos de {max_games}...' ) print('¡Empecemos!\n') winner = play(games_to_win, max_games, computer) print_winner(winner) if not ask_to_continue('Otro juego'): break