¡Nuevo curso!
¡Todo programador debería aprender
IA Generativa!
Prueba una lección gratuita
Cursos
Cursos
Compilador de Código
Compilador de Código
Debatir
Hazte Pro
Teams
Iniciar sesión
Registrarse
Menu
Sesiones de PyR
Buscar
Buscar
Haz una pregunta
Haz una pregunta
Помогите разобраться list = [1, 1, 2, 3, 5, 8, 13] print (list[list[4]]) Почему когда я выдаю ответ 5 он засчитывает, как неправильный?
python
4 Votos
9 Respuestas
7th Aug 2016, 9:54 AM
Anastasiya
The code below loggeg '3 ,3 ,3' as output.How can I fixed it to log '0, 1, 2'?
closures
javascript
5 Votos
6 Respuestas
15th Feb 2021, 8:22 AM
Apongpoh Gilbert
How can I choose random numbers but only from some selected numbers like 1, 2 and 3.
code
coding
java
language
max
min
number
operation
programming
random
1 Voto
4 Respuestas
26th Sep 2020, 3:39 AM
Dhruvan Rai
{ 1, 2, 3, 4 {1, 5, 6, 7}, 5, 6, 3, 4}
java
-1 Voto
3 Respuestas
29th Nov 2016, 2:48 PM
Madhuri Choudhari
A = [ 2, 4, 5, 7 ]. B = [ 1, 2, 6, 7].
array
ask
help
javascript
1 Voto
2 Respuestas
11th Sep 2019, 11:24 AM
Radendy Bahtiar
Num = [10, 11, [ 100, 200, [ 1, 2, 3]], 120]. Num[2][2][1] = 500
lists
python
0 Votos
4 Respuestas
23rd Jul 2017, 1:41 PM
sunandan
What is the output of this code? int array[ ][ ] = {{3, 5, 8}, {7, 54, 1, 12, 4}}; System.out.println(array[0][2]);
arrays
java
-2 Votos
8 Respuestas
16th Jul 2017, 12:08 PM
Himanshu Patel
How can this calculation would be equal to 1, print(1%2), Output 1 pls proof.
python3
-2 Votos
2 Respuestas
31st Oct 2020, 7:13 AM
Muhammad Abdulmalik
For the question: What is the output of this code? sqs = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] print(sqs[1::4]),
list
python
slices
0 Votos
7 Respuestas
14th Aug 2020, 11:29 AM
Hiral Jain
In c language if function data type is void and it returns 1, then it will give error or compile successfully
c
return
void
3 Votos
7 Respuestas
15th Sep 2020, 4:20 PM
kishor pawar
Where am I wrong? I expect when n= 3 output be 1, when n=2 I get 2
kamama
0 Votos
3 Respuestas
18th Jul 2022, 5:08 PM
Samuel Kamama
Can you explain me please, why does the result start from 1, and not from 0
loops
python3
-1 Voto
2 Respuestas
29th May 2018, 8:07 AM
Ruslan 🇰🇿
1. What will be the output? 1. >>> m = [[x, x + 1 , x + 2] for x in ran a) [[1, 2, 3], [4, 5, 6], [7, 8, 9]] b) [[0, 1, 2], [1, 2, 3], [2, 3, 4]] c) [1, 2, 3, 4, 5, 6, 7, 8, 9] d) [0, 1, 2, 1, 2, 3, 2, 3, 4]
lists
python
-1 Voto
7 Respuestas
5th Jul 2016, 6:47 AM
shekhar
Can anyone explain step by step how this code works, starting with print 1, where does it come from?
c++
recursion
2 Votos
3 Respuestas
31st Mar 2020, 10:32 PM
Solo
What about this one? From sololearn code challenges Ingot few minutes ago. The correct answer must be 1, since x<x*x.
java
0 Votos
5 Respuestas
6th Nov 2022, 10:12 AM
Oliver Pasaribu
>>> 11 / 0 Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: division by zero
python
1 Voto
3 Respuestas
5th Aug 2020, 7:56 AM
Nikita Sharma
What is the output of this code? int a 3; int b 1, 2; int c 4; b[3] 10; printf("a %d\n", a);
array
c
cpp
3 Votos
2 Respuestas
17th Feb 2019, 3:50 PM
Lord_fourth
I have a problem with this code, It outputs syntax error on line 1, I can't figure out what is wrong, help?
classes
py
python
python3
0 Votos
6 Respuestas
6th Aug 2020, 5:11 PM
Kristian Purgar
About Average word length it get right in test 1, 2, 4 but the other is no what problem with code?
average
length
problem
word
0 Votos
5 Respuestas
21st Feb 2021, 6:57 AM
Abdullah Said
Converting date formats, having trouble converting the format January 1, 2019 to 1/1/2019 rest MM/DD/YYYY format is converted
python3
0 Votos
2 Respuestas
13th May 2020, 1:58 AM
Shreyash Sinha
I don't understand why g1, g2 & g3 values is not aligned with Group 1, Group 2 and Group 3 which is the expected output..
python
relay_race
solved
2 Votos
6 Respuestas
6th May 2024, 2:14 PM
Moon
Why does this output 1, even if i set it's "index" value to anything above 1 or 2?
javascript
loops
0 Votos
2 Respuestas
20th Aug 2019, 7:46 PM
Henry Hefler
What is the count? If you increase by 1, 2 it gives different values. What does that mea
numpy
0 Votos
2 Respuestas
15th May 2020, 8:01 PM
mohamed alpha
Whenever I click a button instead of increasing the steps by 1, it increases it by 4. Please help
javascript
0 Votos
2 Respuestas
30th Jun 2021, 10:01 AM
Olorunsogo Abiodun Isaac
if x is a float and I have the usual increment x++, will x be increased by 1, or by something else?
c++
data-types
1 Voto
6 Respuestas
15th Jun 2016, 1:37 PM
naghree
A Python statement to declare a Dictionary named ClassRoll with Keys as 1, 2, 3 and corresponding values as 'Reena', 'Rak
python
-3 Votos
3 Respuestas
5th Oct 2020, 4:49 AM
Arpan Pradhan
#include <stdio.h> void main() { int x = 1, z = 3; int y = x << 3; printf(" %d\n", y); }
arithmetic
c
0 Votos
3 Respuestas
14th Jan 2021, 11:30 AM
yogesh
Does Boxing occur when assigning an integer (e.g. 1, 2 or 3) to a 'var' type variable?
boxing
c#
compiler
unboxing
var
0 Votos
1 Respuesta
6th Dec 2016, 12:45 PM
Green Square Dermatology
Create a program C++ to find out numbers divided by 3 out of 10 numbers using an array of dimensions 1,
c++
1 Voto
1 Respuesta
22nd Nov 2018, 4:45 AM
Mikael Gorbacox
mylist = [0, 1, 2, 3, 4, 5, 6, 7] for i in mylist: mylist.remove(i) print(myList) output is [1, 3, 5, 7] Why not removing all
lists
python
1 Voto
5 Respuestas
4th Dec 2019, 5:32 AM
Sreeraj V A
Hello. I want to be able to exit a program whenever i like. For example, when i make a switch() and i press case 1, i want to
c++
return
switch
2 Votos
4 Respuestas
22nd Aug 2019, 6:53 PM
-DSaus-
The last function of code is printing out none instead of 0 and 1, pls what can I do to correct it?? Thanks.
7
1 Voto
3 Respuestas
10th May 2021, 4:45 AM
Adibeh Esther
Why am i Getting this Error??? Enter a number: Traceback (most recent call last): File "..\Playground\", line 1, in <module>
python
type-conversion
0 Votos
2 Respuestas
4th Mar 2017, 9:05 PM
Cpt JokrZ
squares = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] print(squares[2:6]) how does it result in [4, 9, 16, 25] I don't und2
python
2 Votos
3 Respuestas
19th Feb 2021, 2:49 PM
Coder Jon
why the answer of this code is [0, 1, 4, 9, 16, 25, 36, 49, 64] and not [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] and iam remember that -1 starts from the last no. in the list , then why the answer is not include 81????
lists
python
0 Votos
3 Respuestas
4th Aug 2016, 5:31 PM
Ahmed Kamal
Составьте программу с использованием одной функции с переменным количеством аргументов для об- исчисление сумм чисел 1, 3, 5, 7,
phyton
0 Votos
1 Respuesta
18th Apr 2020, 9:46 AM
Mas Fuerte
What was wrong with that code c++ that I created? Code only completes test 1, 2, & 3. Sory my bad english
c++
codecoach
0 Votos
1 Respuesta
19th Feb 2020, 9:07 AM
Ramadhan Sir
Using Java create a program that displays rectangle, triangle and circle by promoting a user to key in 1, 2 or 3 .
java
0 Votos
2 Respuestas
11th Aug 2020, 6:48 AM
Sharon Nzaya
Why when i set b to 1, 5 or 10 the answer is always 5 ??? I can't understand it. Please help me
a++
b=a++
c++
number
0 Votos
2 Respuestas
25th Apr 2018, 9:55 AM
WindSeaVT
Как вы считаете, если я хочу выучить к примеру языки C++ и Java, то следует выучить сначала 1, потом другой или учить сразу 2?
c++
java
progress
sololearn
1 Voto
2 Respuestas
19th Sep 2018, 10:21 AM
Программист Корнеев
Imagine you have an empty JavaScript array (list=[ ]), If you insert 9 in position 0, 3 in position 1, and then 8 in position 0
#sololearn
2 Votos
2 Respuestas
30th Apr 2018, 1:54 PM
shadrach esharive
Can i set a list to start indexing from 1, what i mean is that, instead the first element to be [0], it would be [1]
index
list
python
0 Votos
4 Respuestas
14th Sep 2018, 4:36 PM
Joseph Ojo
What if you want to add a varying number of inputs to the function. i.e. you want it to perform addition for 1, 2, 3 , 4 or 5
function-arguments
function-parameters
1 Voto
7 Respuestas
9th Aug 2019, 9:26 AM
JeClives
how can i write 1 times 1, 2 times 2 , 3 times 3 in page with for loop? for example (1223334444)
c#
c++
1 Voto
2 Respuestas
8th Sep 2017, 8:48 AM
Oğuz Güven
4 is the correct answer. list(range(5)) = [0, 1, 2, 3, 4] and nums[4] is the 5th element of the list.
python
range
0 Votos
2 Respuestas
17th Mar 2017, 10:09 AM
Petrov Ilya V
I am confused to learn what, on my campus I learn C ++ for semester 1, and Java for semester 2 but I want to also learn javascri
c++
java
javascript
programmer
programmerlife
1 Voto
6 Respuestas
6th Sep 2017, 12:43 AM
Irman Utamara
Consider the odd series 1, 3, 5, 7.... 97. Write a function to this series up the last term. Hence print the sum and average.
c++
0 Votos
2 Respuestas
27th Nov 2018, 8:49 AM
Akelemor Bright Cleverly
Write a program that places a +, -, or a space between the digits 1, 2, ..., 9 (in this order) so that the result is 100.
challenges
cpp
cs
js
php
programming
python
1 Voto
4 Respuestas
11th Sep 2017, 4:23 AM
Daniel Ustavshchikov
I want to make project for counting vehicles, using Arduino, Vehicle have 2 wheels ,so i want to get output 1, HOW I CAN DO ??
arduino
c
c++
0 Votos
3 Respuestas
13th Oct 2017, 9:53 AM
Aditya
Два игрока играют в следующую игру.Перед ними лежат две кучки камней, в первой из которых 1, а во второй – 2 камня. У каждого
c++
0 Votos
1 Respuesta
25th Feb 2019, 8:30 AM
Алексей Дороничев
Haz una pregunta
Haz una pregunta
Haz una pregunta
Haz una pregunta
< Anterior
1
2
3
Siguiente >
En tendencia hoy
Code
2 Votes
Need someone who wants to learn programming together
1 Votes
Hi every one i would like to ask question what is difference between try except statement and raise statement?
2 Votes
Solution
0 Votes
Calculator
0 Votes
Whether no. is even or odd. What's wrong in this code?, why it's showing an error?
1 Votes
I think my account’s ability to show up high on Sololearn’s search query died. What do people want to see built?
0 Votes
How to make animation
0 Votes
Sololearn kaleidoscope(easy) python
1 Votes
Sololearn logo
0 Votes