import math
#Variables
t = 1.0 #time (in milliseconds)
n = 10.0 #number of cycles
#Calculation
T = t/n #Time period (in milliseconds)
#Result
print "Time period by one cycle is ",T," ms."
import math
#Variables
t = 0.01 #Time period of positive half cycle (in seconds)
#Calculation
t1 = 0.01 #Time period of negative half cycle (in seconds)
T = t + t1 #Time period of one complete cycle (in seconds)
#Result
print " Time period of rectified input is ",T," s."
import math
#Variables
n = 5.0 #number of cycles
t = 10.0 #time period (in micro-seconds)
#Calculation
f = n / t #frequency (in Mega-hertz)
T = 1/f #Time period (in micro-seconds)
#Result
print "Frequency and Time period of the sine wave is ",f," MHz and ",T," micro-seconds."
import math
#Variables
f = 69.0 #frequency (in Mega-hertz)
#Calculation
T = 1/f #Time period (in micro-seconds)
#Result
print "Time period is ",round(T * 10**3,2), " ns."
import math
#Variables
Vmax = 20.0 #Voltage (in milli-volts)
#Calculation
Vrms = 0.707 * Vmax #Rms Voltage (in milli-volts)
Vdc = 0.637 * Vmax #Average value of signal (in milli-volts)
#Result
print "RMS value is ",Vrms," mV.\nAverage value is ",Vdc," mV."