diff options
Diffstat (limited to 'progs/a915.py')
-rw-r--r-- | progs/a915.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/progs/a915.py b/progs/a915.py new file mode 100644 index 0000000..6298b31 --- /dev/null +++ b/progs/a915.py @@ -0,0 +1,6 @@ +def Seq_Linear(seq_nums):
+ seq_nums = [seq_nums[x] - seq_nums[x-1] for x in range(1, len(seq_nums))]
+ if len(set(seq_nums)) == 1:
+ return "Linear Sequence"
+ else:
+ return "Non Linear Sequence"
\ No newline at end of file |