Click here to Skip to main content
15,888,151 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Python
def power(base, exponent):
    result = base ** exponent
    print(("%d to the power of %d is %d.") % (base, exponent, result))


power(37, 4)


What I have tried:

I have tried stackoverflow but they apparently don't use English on that website I need a simple explanation of this problem please.
Posted
Updated 29-Jun-22 18:37pm
v2

Quote:
In this situation, is result a variable or a function or something else

result is a variable.
You should learn Python seriously, the question is Python 101, first day course. do not skip those.
 
Share this answer
 
Comments
CPallini 30-Jun-22 2:21am    
5.
Patrice T 30-Jun-22 3:32am    
Thank you
result is a variable.
Anything to the left of an assignment (equals sign in Python) is a variable of some form - strictly speaking this is an lvalue: Lvalue and Rvalue – Programming Fundamentals[^]
 
Share this answer
 
Comments
CPallini 30-Jun-22 2:21am    
5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900