Sprint View

3.13 Developing Procedures

6 min read
  • 3.13 Developing Procedures - Syntax Terrors
  • Developing vs. Calling a Procedure
    • Key Points
    • JavaScript
    • Python
  • What is Procedural Abstraction?
    • Key Points
    • JavaScript
    • Python
  • Solving Problems with Procedures
    • Key Points
    • JavaScript
    • Python
  • Modularity
    • Key Points
    • JavaScript
    • Python
  • Code Reuse and Readability
    • Key Points
    • JavaScript
    • Python
  • Return Statements
    • Key Points
    • JavaScript
    • Python
  • Flexibility and Maintenance
    • Key Points
    • JavaScript
    • Python
  • Try It Yourself: Write and Call a Procedure
    • Key Points
    • Try It Yourself (JavaScript)
    • Try It Yourself (Python)

3.13 Developing Procedures - Syntax Terrors

Developing vs. Calling a Procedure

Key Points

  • Developing a procedure means writing the code for what it does.

  • Calling a procedure means using it in your program.

  • You must develop (define) a procedure before you can call it.

JavaScript


// Developing (defining) the procedure
function double(num) {
    console.log(num * 2);
}
// Calling the procedure
double(5);


          

Developing a procedure is when you write the function itself, including its name, parameters, and instructions.

  • Example: function double(num) { console.log(num * 2); }

Calling a procedure is when you use its name to make it run.

  • Example: double(5);

Python


# Developing (defining) the procedure
def double(num):
    print(num * 2)
# Calling the procedure
double(5)


          

Developing a procedure is when you write the function, including its name, parameters, and instructions.

  • Example: def double(num): print(num * 2)

Calling a procedure is when you use its name to make it run.

  • Example: double(5)

Course Timeline