# Answer to Question #3163 in Python for mukundareddy

Question #3163

Program to print a to z characters using for loop?

Expert's answer

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, "."

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, "."

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment