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.

Answered by James H. Python tutor

6194 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

Create a program that takes in two numbers and returns the highest of the two


Write a program that computes the sum of all numbers up to a input number n


Explain the difference between local and global variables


What would you expect to be the output of the following code snippet: `a = [1, 2, 3]; b = a; b[1] = 4; print(a); print(b);`, and why?


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2025

Terms & Conditions|Privacy Policy
Cookie Preferences