Hai friends i have doubt when i run this program ? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

Hai friends i have doubt when i run this program ?

When i print a address is 1 it print 272(last three digit) and i next print address of 2 it print 288 .the main point is the difference between these two numbers is 16 but if i print address of 4 it print 320 What pattern python follow plse help me ? https://code.sololearn.com/cfz8u8HA2Ngb/?ref=app

12th Nov 2018, 1:32 PM
Programmer Raja
Programmer Raja - avatar
4 Respostas
+ 3
OK. Its random. One off my outputs was. 992 008 040 296
12th Nov 2018, 2:25 PM
Anya
Anya - avatar
+ 3
Sure i oversimplify my answer. This depends a lot of stuff. Not only python. But how codeplayground works and how python was integrated in platform. It will depend too how the algorithm that makes memory manager works. This is why sometimes have a pattern and sometimes don't. The algorithm addopts some strategy but not im all cases and all the time. this is what i mean by random.
12th Nov 2018, 2:41 PM
Anya
Anya - avatar
+ 2
Anya but i tried this in 3 different computer it return same pattern but not same number
12th Nov 2018, 2:30 PM
Programmer Raja
Programmer Raja - avatar
0
Anya thanks
12th Nov 2018, 2:43 PM
Programmer Raja
Programmer Raja - avatar