# sampling rate
#Given data :
N=10.0 #number of cycles
f1=1*10**3 #in Hz
f2=100*10**3 # in Hz
sampling_period1=N/f1 # in seconds
sampling_frequency1=1/sampling_period1 # in Hz
print "sampling frequency of 1 kHz signal is ", sampling_frequency1, " samples/second"
sampling_period2=N/f2 # in seconds
sampling_frequency2=1/sampling_period2 # in Hz
print "sampling frequency of 100 kHz signal is ", sampling_frequency2," samples/second"
# sampling rate
#Given data :
N=10.0 #number of cycles
f=1*10**3 #in Hz
sampling_period=N/f # in seconds
sampling_rate=1/sampling_period # in Hz
print "sampling rate is ",sampling_rate," samples/second"