# Resolution
#Given data :
n=4.0 # no. of full digits
R=1/10**n
print "Resolution of voltmeter, R = ", R
#Resolution
#Given data :
n=5.0 # no. of full digits
R=1.0/10**n
print "Resolution, R = %.5f" %R
#Resolution
#Given data :
n=4.0 # no. of full digits
R=1/10**n
print "Resolution, R = ", R
import numpy
import math
#Voltage and time interval
#Given data :
t1=1.0 #sec
R=100.0 #kohm
C=1.0 #micro F
C*=10**-6 # F
Vin=1.0 #V
Vref=5.0 #V
def integrate(a,b,f):
# def function before using this
# eg. : f=lambda t:200**2*t**2
#a=lower limit;b=upper limit;f is a function
import numpy
N=1000 # points for iteration
t=numpy.linspace(a,b,N)
#ft=f(t)
ans=numpy.sum(f)*(b-a)/N
return ans
# Calculating output vl=oltage
a=0
b=t1
Vout=1/R/C*integrate(a,b,Vin) # V
print "Voltage developed at the output after 1 sec is ",Vout," V"
#Vout=Vref*t2/R/C & Vout=Vin*t1/R/C
t2=t1*Vin/Vref #sec
print "Time interval t2 is ",t2," sec"