write a function in JavaScript or python that takes an array of integers and determines if the array is Arithmetic or Geometric | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

write a function in JavaScript or python that takes an array of integers and determines if the array is Arithmetic or Geometric

if the array argument is Geometric return 'Geometric', if Arithmetic return 'Arithemetic', else return -1. No loops are allowed.

26th Jun 2017, 9:22 PM
Elijah Bobzom
Elijah Bobzom - avatar
2 ответов
+ 1
@nobody nice try. but try any arithmetic array with zero as the first input. it returns the wrong answer.
22nd Sep 2017, 9:17 PM
Elijah Bobzom
Elijah Bobzom - avatar