4. Find the errors in following function
definitions :
(a) def main()
print ("hello")
(6) def func2() :
print (2 + 3)
(c) def compute():
print (x * x)
(d) square (a)
return a * a
could u solve this??????
Answers
Answered by
3
Answer:
a)Correction :
void main()
System.out.println("hello");
b)Correction:
void func2()
System.out.println(2+3):
c)Correction:
void computer()
System.out.println(x*x);
d) Correction:
double square(a)
return a*a;
Answered by
2
Answer:
(a) : is missing
(b) no error
(c) x not defined in local space ; should be provided as argument from global space
(d)def and : is missing
Similar questions