Program to print a to z characters using for loop?
1
Expert's answer
2011-06-20T12:23:12-0400
x=input('set integer x:') y=input('set integer y:') if y<x: z=y y=x x=z z=0 for i in range(y-x-1): z=z+1 if z==0: print "There are no numbers between", x, " and ", y, "." if z==1: print "There is ", z, " number between", x, " and ", y, "." if (z!=1)&(z!=0): print "There are ", z, " numbers between", x, " and ", y, "."
Comments