The Student Room Group

Computer science

So im doing ocr as level computer science and ive just looked at functions and procedures again. My textbook says that a function must return a value, but a procedure doesn't have to. However in a youtube video it said that a procedure could display a high score table without returning a value. So now im confused as to what returning a value means, i initially thought it meant displaying something, like printing something but this makes me realise im wrong. So what does returning a value actually mean?
Sorry you've not had any responses about this. :frown: Are you sure you've posted in the right place? :smile: Here's a link to our subject forum which should help get you more responses if you post there. :redface:
Reply 2
Both functions and procedures are subroutines, like you said functions will return a value while procedures will not. By it returning a value it can be anything and it is done by the value then taking the function name (this is python) , what the YT vid was saying was within the procedure it will 'print' / output the values without returning a value to the main program

Quick Reply

Latest