/ Published in: Python

Print number histogram 2
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/python def func(a, b): la = a lb = b while la <= lb: for i in range(a, b+1): if (la <= i) and (i <= lb): print i, else: print " ", la += 1 lb -=1 #print func(1,5)
Comments
