SAMPLE EXAMPLE
# Example Number # Problem statement as given in the textbook # variable declaration { Declare the variables here } { Specify the quantity with the units in comments} # Calculation { Show calculation here with comments } # Result { Print Result here with proper rounded-off value and units } --------------------------------------------------------------------- #Example 1.1.py #What is the current of a circuit that has 3 V and 0.5 ohm of resistance? #Variable declaration V = 3 #Voltage of circuit(V) R = 0.5 #Resistance of circuit(Ohm) #Calculation I=V/R #Current(A) #Result print "Current through the circuit is",round(I), "A"