def run_block_b(): is_running = True while is_running: print("\nWhich program in 'Block B: Basics (Decisions)' do you wish to run?\n") print("[1] if_op\n[2] if_else\n[3] if_elif_else\n[4] modulo_operator\n[5] comperation_operator\n[6] counter\n[7] nested\n[8] nestception\n[9] or_operator\n[10] and_operator\n[11] decision_review\n[12] quit\n") response = input() if (response == "1"): if_op.run() elif (response == "2"): if_else.run() elif (response == "3"): if_elif_else.run() elif (response == "4"): modulo_operator.run() elif (response == "5"): comperation_operator.run() elif (response == "6"): counter.run() elif (response == "7"): nested.run() elif (response == "8"): nestception.run() elif (response == "9"): or_operator.run() elif (response == "10"): and_operator.run() elif (response == "11"): decision_review.run() elif (response == "12"): break else: print("Invalid option! Please try again.")
def run_nested_decision(): while (True): print("[a] use of multiple nested decision program") print("[b] use of nested decision program") print("[q] to quit") print(" please Enter which program you want to Execute") print(" press a/b/q") choice = input().lower().strip() if choice == "a": nestception.run() elif choice == "b": nested.run() elif choice == "q": break else: print("Invalid option! Please try again.")
def run_nested_loop(): while (True): print("[a] one loop nested in another program") print("[b] use of nested loop and decision program") print("[q] to quit") print(" please Enter which program you want to Execute") print(" press a/b/q") choice = input().lower().strip() if choice == "a": nested.run() elif choice == "b": nesting.run() elif choice == "q": break else: print("Invalid option! Please try again.")
def run_nested_decisions(): while (True): print("""Run any of the following from Block A: Nested Decisions: [a] : nestception.py [b] : nested.py [m] : Block A Menu """) response = input() if response == "a": nestception.run() elif response == "b": nested.run() elif response == "m": break else: print("Invalid option! Please try again.")
def run_block_a(): print("Which program in 'Block A: Basics' do you wish to run?") response = input() # function calls for basics --> output if response == "simple_message": simple_message.run() elif response == "multiline_message": multiline_message.run() elif response == "ascii_art": ascii_art.run() elif response == "escape_characters": escape_characters.run() # function calls for basics --> repetitions --> while loops elif response == "sum_user_numbers": sum_user_numbers.run() elif response == "sum_100": sum_100.run() elif response == "while_simple": while_simple.run() elif response == "len": len.run() elif response == "factorial": factorial.run() elif response == "count": count.run() elif response == "ascii": ascii.run() # function calls for basics --> repetitions --> nested loops elif response == "nested": nested.run() elif response == "nesting": nesting.run() # function calls for basics --> repetitions --> for loops elif response == "characters": characters.run() elif response == "count_down": count_down.run() elif response == "membership_operators": membership_operators.run() elif response == "range": range.run() elif response == "reverse": reverse.run() elif response == "simple": simple.run() # function calls for basics --> modules elif response == "guess_the_number": guess_the_number.run() # function calls for basics --> input elif response == "ascii_robot": ascii_robot.run() elif response == "data_types": data_types.run() elif response == "review_beeps_garden": review_beeps_garden.run() elif response == "string_operators": string_operators.run() elif response == "user_input": user_input.run() # function calls for basics --> functions elif response == "ascii_character": ascii_character.run() elif response == "ascii_code": ascii_code.run() elif response == "function_calls": function_calls.run() elif response == "function_with_loop": function_with_loop.run() elif response == "function_with_nesting": function_with_nesting.run() elif response == "function_with_parameter": function_with_parameter.run() elif response == "function_with_parameters": function_with_parameters.run() elif response == "multiple_functions": multiple_functions.run() elif response == "return_values": return_values.run() elif response == "simple_function": simple_function.run() # function calls for basics --> decisions elif response == "and_operator": and_operator.run() elif response == "or_operator": or_operator.run() elif response == "decision_review": decision_review.run() # function calls for basics --> decisions --> simple decision elif response == "comparison_operators": comparison_operators.run() elif response == "counter": counter.run() elif response == "decision_if": decision_if.run() elif response == "if_elif_else": if_elif_else.run() elif response == "if_else": if_else.run() elif response == "modulo_operator": modulo_operator.run() # function calls for basics --> decisions --> nested decision elif response == "nestception": nestception.run() elif response == "nested_decision": nested_decision.run() else: print("please enter a valid response")
def run_block_a(): print("Which program in 'Block A: Basics' do you wish to run?") response = input() if response == "simple_message": simple_message.run() elif response == "multiline_message": multiline_message.run() elif response == "escape_characters": escape_characters.run() elif response == "ascii_art": ascii_art.run() elif response == "ascii_robot": ascii_robot.run() elif response == "data_types": data_types.run() elif response == "review_input": review_input.run() elif response == "string_operators": string_operators.run() elif response == "user_input": user_input.run() elif response == "review_decisions": review_decisions.run() elif response == "or_operator": or_operator.run() elif response == "and_operator": and_operator.run() elif response == "comparison_operators": comparison_operators.run() elif response == "counter": counter.run() elif response == "if_elif": if_elif.run() elif response == "if_else": if_else.run() elif response == "modulo_operator": modulo_operator.run() elif response == "nestception": nestception.run() elif response == "nested": nested.run() elif response == "count_down": count_down.run() elif response == "characters": characters.run() elif response == "membership_operators": membership_operators.run() elif response == "range": range.run() elif response == "reverse": reverse.run() elif response == "simple_for": simple_for.run() elif response == "nested_loop": nested_loop.run() elif response == "nesting": nesting.run() elif response == "ascii_while": ascii_while.run() elif response == "count": count.run() elif response == "factorial": factorial.run() elif response == "len": len.run() elif response == "simple_while": simple_while.run() elif response == "sum_100": sum_100.run() elif response == "sum_user_numbers": sum_user_numbers.run() elif response == "ascii_character": ascii_character.run() elif response == "ascii_code": ascii_code.run() elif response == "function_calls": function_calls.run() elif response == "function_with_loop": function_with_loop.run() elif response == "function_with_nesting": function_with_nesting.run() elif response == "function_with_parameter": function_with_parameter.run() elif response == "function_with_parameters": function_with_parameters.run() elif response == "multiple_functions": multiple_functions.run() elif response == "return_values": return_values.run() elif response == "simple_function": simple_function.run() elif response == "guess_the_number": guess_the_number.run() else: print("Invalid response! Please try again.")
#import main as m from main import calculate_area print(calculate_area()) import basics.decisions.nested_decision.nested as nested nested.run()