Answer to Question #3163 in Python for mukundareddy

Question #3163
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, "."

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS