Skip to content

Instantly share code, notes, and snippets.

Created March 18, 2014 08:00
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")
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