<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def execute_command(cmd, execute, echo=True):
 """Execute a command in shell or just print it if execute is False"""

    if execute:
        if echo:
            print("Executing: " + cmd)
        return os.system(cmd)
    else:
        print(cmd)
        return 0