Find and write the output of the following python code:
a=10
def call():
global a
a=15
b=20
print(a)
call()
Answers
Answer:
Random access refers to the ability to access data at random. The opposite of random access is sequential access. To go from point A to point Z in a sequential-access system, you must pass through all intervening points. In a random-access system, you can jump directly to point Z. Disks are random access media, whereas tapes are sequential access media.
Explanation:
Random and Sequential Describe Data Files
The terms random access and sequential access are often used to describe data files. A random-access data file enables you to read or writeinformation anywhere in the file. In a sequential-access file, you can only read and write information sequentially, starting from the beginning of the file.
Read more on Brainly.in - https://brainly.in/question/12670614#readmore
The global keyword is used to declare any variable to global. This value can be changed at any time.
Explanation:
Missing information:
- There is an indentation missing in the code. From the statement "global a" to the statement "print(a)" is the part of the function call whereas statement "call" is the outside of the function call().
Detailed Explanation:
- The global keyword is used to declare any variable to global. This value can be changed at any time.
- When the value of the "a" variable is printed after the calling statement, then also it renders as 15. It is because the "global a" makes the 'a' variable as global.
- The above code renders the value of 'a' variable as 15 because the statement "a=15" in the calling statement replaces the value of a from 10 to 15.
Learn More:
- Output of the python program : https://brainly.in/question/10336898