191k views
4 votes
Input is a function in both Python and JavaScript.

A.
True

B.
False

User GinoA
by
7.9k points

2 Answers

3 votes
i believe the answer is A .) TRUE
User Rick Wayne
by
8.8k points
6 votes

Answer:

True.

Step-by-step explanation:

The concept of a function exists in both Python and JavaScript. Functions in both languages allow you to define a block of code that can be executed repeatedly, either by calling the function with specific arguments or by invoking it directly.

In Python, you can define a function using the def keyword followed by the function name, parameter list, and a block of code. Here's an example of a simple function in Python that adds two numbers:

"""

def add_numbers(a, b):

return a + b

"""

In JavaScript, you can define a function using the function keyword followed by the function name, parameter list, and a block of code. Here's an example of a simple function in JavaScript that adds two numbers:

"""

function addNumbers(a, b) {

return a + b;

}

"""

So, functions exist in both Python and JavaScript, making the statement "true" or "A"

User Georgy Pashkov
by
8.7k points