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
Answered by James H. Python tutor

7114 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

Write a function s(n) that will return a list of the first n squares.


Write a simple Python program that asks a user to input their age and name and then return the text: "Hi my name is *NAME*, and I am *AGE* years old."


Demonstrate a recursive solution to calculate the factorial of a number


Create an algorithm that can be used as a guessing game. Make sure to import random at the start.


We're here to help

contact us iconContact ustelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2025

Terms & Conditions|Privacy Policy
Cookie Preferences