Whats is the difference between a function and a procedure?

A procedure is a named set of instructions that can be called on by throughout the program.A function is a procedure that returns a value.Both functions and procedures can take parameters.

JH

Related Python Mentoring answers

All answers ▸

[Student query] Why do we import libraries/modules such as Numpy and Matplotlib into Python?


How do I check if a number is prime using a python program?


When do we use a for-loop and when a while-loop?


What's the difference between a local and a global variable?