Raktim Posted February 11, 2019 Share Posted February 11, 2019 Sir, can I declare a Function with its return type and parameter's type on Python like C Language? void main() { void sum(int,int); /*function declaration*/ sum(5,5); } void sum(int x,int y)/*function defination*/ { /*function body*/ int result; result=x+y; printf ("The Sum is %d",result); } Can i do this same code on python? Python support Function Declaration? If yes, then how i declare a function on python Link to comment Share on other sites More sharing options...
justsomeguy Posted February 11, 2019 Share Posted February 11, 2019 https://www.w3schools.com/python/python_functions.asp Link to comment Share on other sites More sharing options...
Raktim Posted February 11, 2019 Author Share Posted February 11, 2019 Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now