0
CHALLENGE
I want to make a software which takes two inputs 1.A function 2.A value and gives output of that function with the value EXAMPLE INPUT 1-> sin(x+cos(x)) INPUT 2 -> 90 OUTPUT 1 AS sin(90+cos(90))=1
3 Answers
0
please ANSWER IT
- 1
If you add function like that in the parameter you will get error "x is not defined".
Before the script executes the actual function it tries to execute sin(x+cos(x)) which is not possible because variable x doesn't exist.
If you want to use function as parameter you can't call it. It should be something like this.
call(sin, 90);