+ 1

please check this code what is error

m=30 def(n): x=2 n=x+n print (n): def (m)

28th Jul 2017, 1:38 PM
Shamsul haq
Shamsul haq - avatar
4 Réponses
+ 4
You are not defining anything. You have a parameter of n, but do not have a name for your function.
28th Jul 2017, 4:54 PM
Bridgetn58
Bridgetn58 - avatar
+ 3
if you want to define a function you have to give it a name, so def myfunction(n): #this is right def(n): #it doesn't work, the function hasn't a name then when you call the function you have to write myfunction(m)
28th Jul 2017, 1:54 PM
Matte
Matte - avatar
0
thank you all of my friend
30th Jul 2017, 4:29 AM
Shamsul haq
Shamsul haq - avatar