17. What is the output of the following code?
a = 1
def f():
a = 10
print(a)
Answers
Answered by
4
Answer:
10
Explanation:
lastely declared variable
Answered by
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
Biology,
3 months ago
Physics,
3 months ago
Hindi,
3 months ago
Math,
7 months ago
Computer Science,
11 months ago