Computer Science, asked by smartgirl323, 5 months ago

4. Find the errors in following function
definitions :
(a) def main()
print ("hello")
(b) def func2():
print (2 + 3)
(c) def compute() :
print (x * x)
(d) square (a)
return a * a. ​

Answers

Answered by Anonymous
6

Answer:

hello,

Explanation:

(a)

def main() :

   print ("hello")

main()   #for calling the function else it wont work

(b)

def func2():

   print (2 + 3)

func2()  #for calling the function else it wont work

(c)

def compute(x) :

   print (x * x)

a=int(input("enter the number"))

compute(a)    #for calling the function else it wont work

(d)

def square (a):

   return a * a

x=int(input("enter the number"))

print(square(x))   #for calling the function else it wont work

hope it helps you

please mark brainliest

@ItzSnowySecret07

Similar questions