Esempio n. 1
0
def run_modules():
    while (True):
        print("[a] Guess the Number program")
        print("[q] to quit")
        print(" please Enter which program you want to Execute")
        print(" press a/q")
        choice = input().lower().strip()
        if choice == "a":
            guess_the_number.run()
        elif choice == "q":
            break
        else:
            print("Invalid option! Please try again.")
Esempio n. 2
0
def run_modules():
    while (True):
        print("""Run any of the following from Block A: Modules:
                 [a] : guess_the_number.py
                 [m] : Block A Menu """)
        response = input()

        if response == "a":
            guess_the_number.run()
        elif response == "m":
            break
        else:
            print("Invalid option! Please try again.")
Esempio n. 3
0
def run_block_a():
    print("Which program in 'Block A: Basics' do you wish to run?")
    response = input()
    if (response == "simple_message"):
        print("")
        simple_message.run()
    elif (response == "multiline_message"):
        print("")
        multiline_message.run()
    elif (response == "ascii_art"):
        print("")
        ascii_art.run()
    elif (response == "escape_characters"):
        print("")
        escape_characters.run()
    elif (response == "data_types"):
        print("")
        data_types.run()
    elif (response == "input_review"):
        print("")
        input_review.run()
    elif (response == "string_operators"):
        print("")
        string_operators.run()
    elif (response == "user_input"):
        print("")
        user_input.run()
    elif (response == "comparison_operator"):
        print("")
        comparison_operator.run()
    elif (response == "counter"):
        print("")
        counter.run()
    elif (response == "if_elif_else"):
        print("")
        if_elif_else.run()
    elif (response == "if_else"):
        print("")
        if_else.run()
    elif (response == "if_"):
        print("")
        if_.run()
    elif (response == "modulo_operator"):
        print("")
        modulo_operator.run()
    elif (response == "and_operator"):
        print("")
        and_operator.run()
    elif (response == "or_operator"):
        print("")
        or_operator.run()
    elif (response == "nestception"):
        print("")
        nestception.run()
    elif (response == "nested"):
        print("")
        nested.run()
    elif (response == "decisions_review"):
        print("")
        decisions_review.run()
    elif (response == "characters"):
        print("")
        characters.run()
    elif (response == "count_down"):
        print("")
        count_down.run()
    elif (response == "membership_operators"):
        print("")
        membership_operators.run()
    elif (response == "range_"):
        print("")
        range_.run()
    elif (response == "for_loop_reverse"):
        print("")
        for_loop_reverse.run()
    elif (response == "for_loop_simple"):
        print("")
        for_loop_simple.run()
    elif (response == "nested_loop_nested"):
        print("")
        nested_loop_nested.run()
    elif (response == "nesting"):
        print("")
        nesting.run()
    elif (response == "count"):
        print("")
        count.run()
    elif (response == "factorial"):
        print("")
        factorial.run()
    elif (response == "sum_user_numbers"):
        print("")
        sum_user_numbers.run()
    elif (response == "sum100"):
        print("")
        sum100.run()
    elif (response == "while_loop_simple"):
        print("")
        while_loop_simple.run()
    elif (response == "while_loop_ascii"):
        print("")
        while_loop_ascii.run()
    elif (response == "while_loop_len"):
        print("")
        while_loop_len.run()
    elif (response == "ascii_character"):
        print("")
        ascii_character.run()
    elif (response == "ascii_code"):
        print("")
        ascii_code.run()
    elif (response == "function_calls"):
        print("")
        function_calls.run()
    elif (response == "function_with_loop"):
        print("")
        function_with_loop.run()
    elif (response == "function_with_nesting"):
        print("")
        function_with_nesting.run()
    elif (response == "function_with_parameter"):
        print("")
        function_with_parameter.run()
    elif (response == "function_with_parameters"):
        print("")
        function_with_parameters.run()
    elif (response == "multiple_functions"):
        print("")
        multiple_functions.run()
    elif (response == "return_values"):
        print("")
        return_values.run()
    elif (response == "simple_function"):
        print("")
        simple_function.run()
    elif (response == "guess_the_number"):
        print("")
        guess_the_number.run()
Esempio n. 4
0
def run_block_a():
    print("Which program in 'Block A: Basics' do you wish to run?")
    response = input()

    #Output
    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()

    #Input
    elif (response == "user_input"):
        user_input.run()
    elif (response == "ascii_robot"):
        ascii_robot.run()
    elif (response == "data_types"):
        data_types.run()
    elif (response == "string_operators"):
        string_operators.run()

    #Decisions> Simple Decisions
    elif (response == "if_"):
        if_.run()
    elif (response == "if_else"):
        if_else.run()
    elif (response == "if_elif_else"):
        if_elif_else.run()
    elif (response == "modulo_operator"):
        modulo_operator.run()
    elif (response == "comparison_operators"):
        comparison_operators.run()
    elif (response == "counter"):
        counter.run()
    elif (response == "nested"):
        nested.run()
    elif (response == "nestception"):
        nestception.run()
    elif (response == "or_operator"):
        or_operator.run()
    elif (response == "and_operator"):
        and_operator.run()

    #Repetitions
    #Repetitions> while_loop
    elif (response == "simple_while_loop"):
        simple_while_loop.run()
    elif (response == "count"):
        count.run()
    elif (response == "ascii_"):
        ascii_.run()
    elif (response == "sum_100"):
        sum_100.run()
    elif (response == "sum_user_numbers"):
        sum_user_numbers.run()
    elif (response == "factorial"):
        factorial.run()
    elif (response == "len_"):
        len_.run()

    #Repetitions> for_loop
    elif (response == "simple_for_loop"):
        simple_for_loop.run()
    elif (response == "count_down"):
        count_down.run()
    elif (response == "range_"):
        range_.run()
    elif (response == "characters"):
        characters.run()
    elif (response == "reverse"):
        reverse.run()
    elif (response == "membership_operators"):
        membership_operators.run()

    #Repetitions> nested_loop
    elif (response == "nested_"):
        nested_.run()
    elif (response == "nesting"):
        nesting.run()

    #Functions
    elif (response == "ascii_code"):
        ascii_code.run()
    elif (response == "ascii_character"):
        ascii_character.run()
    elif (response == "simple_function"):
        simple_function.run()
    elif (response == "function_with_nesting"):
        function_with_nesting.run()
    elif (response == "function_with_parameter"):
        function_with_parameter.run()
    elif (response == "function_with_loop"):
        function_with_loop.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 == "function_calls"):
        function_calls.run()

    #Modules
    elif (response == "guess_the_number"):
        guess_the_number.run()
Esempio n. 5
0
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")
Esempio n. 6
0
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.")