Question

True or false? Calling a function and defining a function mean the same thing.

Solution

Verified

Step 1

1 of 2

False. Defining a function means setting up the code that will run once the function is called. Calling a function is when the function actually runs.

Example:

We define the function hello() in the next two lines. This is a void

function because it does not return any value.

def hello(): print(`Greetings from Cthulhu')

print(`Incoming message:')

This is the function call. It's where the function actually gets run.

hello()

print(`Message complete.')

Create an account to view solutions

By signing up, you accept Quizlet's Terms of Service and Privacy Policy
Continue with GoogleContinue with Facebook

Recommended textbook solutions

Computer Organization and Design MIPS Edition: The Hardware/Software Interface 5th Edition by David A. Patterson, John L. Hennessy

Computer Organization and Design MIPS Edition: The Hardware/Software Interface

5th EditionDavid A. Patterson, John L. Hennessy
220 solutions
Starting Out with Python 3rd Edition by Tony Gaddis

Starting Out with Python

3rd EditionTony Gaddis
610 solutions
Fundamentals of Database Systems 7th Edition by Ramez Elmasri, Shamkant B. Navathe

Fundamentals of Database Systems

7th EditionRamez Elmasri, Shamkant B. Navathe
687 solutions
Introduction to Algorithms 3rd Edition by Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen

Introduction to Algorithms

3rd EditionCharles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen
720 solutions

Related questions