No Repeats

Write a function, ‘no_repeats(year_start, year_end)’, which takes a
range of years and outputs those years which do not have any
repeated digits.

You should probably write a helper function, ‘no_repeat?(year)’ which
returns true/false if a single year doesn’t have a repeat.

TEST CASES: 

screen-shot-2016-11-18-at-5-39-47-pm

My Solution:  

screen-shot-2016-11-18-at-5-40-59-pm

Provided Solution:

screen-shot-2016-11-18-at-5-42-12-pm

Advertisements
No Repeats

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s