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 ▸

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


Implement a fibonacci function which calculates the nth number of the fibonacci sequence.


Describe both For-loops and While-loops and explain how you can simulate the effect of a for loop with a while loop with an example.


Sort a given input of lowercase letters alphabetically