8.7k views
2 votes
Can a function have a repeating input

User Varesa
by
7.4k points

1 Answer

5 votes

Answer: It Depends

Explanation: Generally, your answer would be no because if you have a repeating input, you usually have a different output for that specific repeating input which would not make it a function.

However, a function can have a repeating input if the same input is paired with the same output and this is listed twice so it's still a function since each input pairs with a unique output.

However, if the input appears more than once, you must check to see whether the output is the same or different.

User Gimlichael
by
7.7k points