Computer Science, asked by shilpibhargava1234, 7 months ago

17. What is the output of the following code?
a = 1
def f():
a = 10
print(a)​

Answers

Answered by dharanimerugu02
4

Answer:

10

Explanation:

lastely declared variable

Answered by Jasleen0599
0

10

PYTHON CODE

a = 1

def f():

a = 10

print(a)​

Output:

10

  • The keyword used to define a function is def. The parameters are followed by the function name in (). The function body's beginning, which is indicated by an indentation, is indicated by the colon. The return statement in the function body chooses the value that will be returned.
  • The print() function outputs the message to the normal output device, such as the screen. The message can be a string or any other object, and before it is displayed on the screen, the object will be changed into a string.
  • The PRINT command sends data to the display terminal or a different print device that is specified.

#SPJ2

Similar questions