Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#MonthOfCode day 14 - loop
from __future__ import print_function
import sys
def printMultiples(k, sup_bound):
map(print, [ k*i for i in xrange(1,1+(sup_bound/k) ) ] )
if (len(sys.argv)<3 ):
print("this program prints multiples of k up to a cernain bound")
print("usage: python "+sys.argv[0]+" k sup_bound")
sys.exit(1)
printMultiples( int(sys.argv[1]), int( sys.argv[2]) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment