import math

def get_range(val, step):
	stepvals = [i*step for i in xrange(int(math.ceil(val/step)))][1:]
	if not stepvals[-1] == val: # if last element isn't the actual value
		stepvals += [val] # add it in
	return stepvals

import math

def get_range(val, step):
	if args.step >= val:
		raise Exception("Step value is too large! Must be smaller than value.")

	stepvals = [i*step for i in xrange(int(math.ceil(val/step)))][1:]
	if not stepvals[-1] == val: # if last element isn't the actual value
		stepvals += [val] # add it in
	return stepvals

Raise exception if step value is invalid.
Raise exception if step value is invalid.

  import math
  
  def get_range(val, step):
+ 	if args.step >= val:
+ 		raise Exception("Step value is too large! Must be smaller than value.")
+ 
  	stepvals = [i*step for i in xrange(int(math.ceil(val/step)))][1:]
  	if not stepvals[-1] == val: # if last element isn't the actual value
  		stepvals += [val] # add it in
  	return stepvals
  
Raise exception if step value is invalid.
## Code Before:
import math

def get_range(val, step):
	stepvals = [i*step for i in xrange(int(math.ceil(val/step)))][1:]
	if not stepvals[-1] == val: # if last element isn't the actual value
		stepvals += [val] # add it in
	return stepvals

## Instruction:
Raise exception if step value is invalid.
## Code After:
import math

def get_range(val, step):
	if args.step >= val:
		raise Exception("Step value is too large! Must be smaller than value.")

	stepvals = [i*step for i in xrange(int(math.ceil(val/step)))][1:]
	if not stepvals[-1] == val: # if last element isn't the actual value
		stepvals += [val] # add it in
	return stepvals
