import os
import psutil
pid = os.getpid()
py = psutil.Process(pid)
mu = (py.memory_info()[0] / 2.**30) * 1000
print('Memory Use(MB):', mu, 'of process id:', pid)
print('CPU Use:',psutil.cpu_percent())
Solve Problems by Coding Solutions - A Complete solution for python programming
Python Program to Find the Fibonacci Series with defined program storage infinity
a=0
b=1
n=9999999999999999999999 # Number of terms in Fibonacci Series (sample value)
# An integer giving the maximum value a variable of type Py_ssize_t can take.
# It 's usually 2^31 - 1 on a 32-bit platform and 2^63 - 1 on a 64-bit platform.
print(a,b,end=" ")
while(n-2):
c=a+b
a=b
b=c
print("\n",c)
n=n-1
Subscribe to:
Posts (Atom)