Size: a a a

2021 May 24

M

Matrix Telegram Brid... in SPb Python
Wilder Mamani Juli: Hola que tal. Con todos.
источник

SK

Sergio Keler in SPb Python
Aquí nadie habla español. Sabemos solo el ruso.
источник

SK

Sergio Keler in SPb Python
Хорошее имя - мамани хули.
источник

Д

Дэн in SPb Python
источник
2021 May 25

A

Aryn in SPb Python
Подскажите пожалуйста, как имея Discord Bot Token зайти в Discord сервер?
источник

SK

Sergio Keler in SPb Python
Использовать discord bot api очевидно.
источник

A

Aryn in SPb Python
Точно
источник

K

Kappa in SPb Python
хелп

def iq_test(numbers):
   numbers = numbers.split()
   a = 0
   b = 0
   for q in numbers:
       if int(q) % 2 == 0:
           a+=numbers.index(q)
       else:
           b+=numbers.index(q)
   if len(str(a)) == 1:
       return numbers.index(str(a))
   else:
       return numbers.index(str(b))

Traceback (most recent call last):
 File "tests.py", line 6, in <module>
   test.assert_equals(iq_test("88 96 66 51 14 88 2 92 18 72 18 88 20 30 4 82 90 100 24 46"), 4)
 File "/workspace/default/solution.py", line 13, in iq_test
   return numbers.index(str(b))
ValueError: '3' is not in list

Bob is preparing to pass IQ test. The most frequent task in this test is to find out which one of the given numbers differs from the others. Bob observed that one number usually differs from the others in evenness. Help Bob — to check his answers, he needs a program that among the given numbers finds one that is different in evenness, and return a position of this number.

! Keep in mind that your task is to help Bob solve a real IQ test, which means indexes of the elements start from 1 (not 0)

Examples:
iq_test("2 4 7 8 10") => 3 # Third number is odd, while the rest of the numbers are even

iq_test("1 2 1 1") => 2 # Second number is even, while the rest of the numbers are odd
источник

MB

M B in SPb Python
переименуй файл tests.py на что-нибудь без слова test и запусти снова
источник

K

Kappa in SPb Python
а как на кодварс так сделать
источник

MB

M B in SPb Python
хз, но отдельно твой кусок кода выше рабочий
источник

MB

M B in SPb Python
значит у тебя решение неверное, если оно тесты не проходит
источник

Dk

Dn't kill yurself in SPb Python
Здравствуйте
Как можно миносовать циклично ???
например
20 миносовать по 5
20
15
10
5
0
источник

DA

Dmitrii Avdeenko in SPb Python
Добрый день.
range(20, 0, -5)
источник

Dk

Dn't kill yurself in SPb Python
thnx
источник

K

Kappa in SPb Python
источник

SK

Sergio Keler in SPb Python
что такое "миносовать"?
таки мине совать свой нос?
источник

Dk

Dn't kill yurself in SPb Python
Минусовать
источник

Dk

Dn't kill yurself in SPb Python
🤣
источник

SK

Sergio Keler in SPb Python
Ось понятно стало. А то я шото делал нервы.
источник