Cours
Cours
Compilateur de code
Compilateur de code
Discuter
Tarification
Équipes
Se connecter
S'inscrire
Menu
Discussions Q&R
Chercher
Chercher
Poser une question
Poser une question
x=0 i=0 while i<4: x+=i i+=1 print (x)
python
6 Votes
4 Réponses
11th Apr 2022, 11:48 AM
Hemant Kumbhalkar
i=0 x=0 while i<4: x+=i i+=1 print(x)
code
codeplayground
python
python3
0 Vote
2 Réponses
28th Aug 2021, 8:50 AM
Lokesh
a=int(input('Enter the number:')) i=0 while i<=a: print(i) i=i+1 print("Finished!")
loops
0 Vote
2 Réponses
28th Jul 2019, 8:56 AM
Dhyey Badheka
please, won't this code give the same result. i=0 while i<=5 print(i) i+=1 print("finished") and i=0 while 1==1 print(i) i+=1 if i<=5 print ("finished")
loops
python
0 Vote
8 Réponses
21st Sep 2016, 11:16 AM
David Nzere
words=["o","my","god"] i=0 index=len(words)-1 for word in words: if i<=index: print(words[i])
decoding
working
3 Votes
1 Réponse
13th Jan 2019, 5:32 PM
Hari Krishna Sahu
s1 =[3,4] s2 =[1,2] s3=list() i=0 j=0 for i in s1: for j in s2: s3.append((i,j))
for
loops
nested
-4 Votes
35 Réponses
31st May 2020, 7:10 PM
SAADAT ALI
l=[1,2,3,2,2,4,5,2,5,2,4] x=2 i=0 while i<l.count(x): if x in l: l.remove(x) i=i+1 print(l)
remove
0 Vote
2 Réponses
24th Jul 2022, 10:39 AM
Irshad Ahmad
Why not make int i=0 while initializing? I dont get that logic.
java
0 Vote
2 Réponses
11th Apr 2020, 11:58 AM
Shankar Devaraju
How many numbers will the following code output? i=0 while True: i+=1 if(i == 2): continue if(i == 5): break print(i)
question
-1 Vote
11 Réponses
6th Feb 2022, 3:40 PM
mahdi
i=0 cout<< i++ << ++i << i; why the output is 122...shouldnt it be 022.?
c++
1 Vote
4 Réponses
18th Sep 2016, 7:26 PM
Himanshu Sharma
total = 0 #your code goes here i=0 while i<5: age =int(input()) if age < 3: continue total+= 100 print (total )
code
python
python3
while
4 Votes
8 Réponses
12th Feb 2023, 9:27 AM
Nuri
Getting Indexerror & can't solve it! n =6 i=0 c=[n] for i in range (n-1): c[i]=int(input("Enter a number:" )) . in Python
arrays
lists
loops
python
0 Vote
2 Réponses
13th Sep 2021, 3:17 AM
Farzam Baig
How can I write I=0 and I=3 and j=0 and j= 3 in if conditions with proper pattern ???
c
c++
0 Vote
2 Réponses
21st Jul 2016, 6:51 PM
Talha Rao
This is ternary operator 1st condition is true i=0 and true value is 1 but why the output show 3 . Explain?
cpp
sololearn
0 Vote
3 Réponses
16th Sep 2020, 12:08 PM
Suparna Podder
Why this code giving different answer when i = 1 . Please give me logical reason . And how to that we have to put i=0 or i=1 ?
c
loops
prograam
1 Vote
2 Réponses
8th Mar 2022, 8:40 AM
Abhay mishra
#! python # huge list making nn=1000000 a = [] i=0 while i #! python # Using Lists as Stacks stack = [3, 4, 5] stack.append(6) stack.append(7) print stack x=stack.pop() print "popped ",x print stack x=stack.pop() print "popped ",x x=stack.pop() print "popped ",x print stack
python
0 Vote
5 Réponses
20th Jul 2017, 2:04 PM
paul mwengei
Poser une question
Poser une question
Poser une question
Poser une question
Aujourd'hui en vedette
Hofstadter a sequence code coach is not running
0 Votes
the code for bigneer is not really what to do after coding begeneer in sololearn
0 Votes
Vote Code
1 Votes
Input errors (python)
1 Votes
What’s the actual difference between MB and GB in real-world usage?
1 Votes
Without degree job
0 Votes
Script file names
0 Votes
I wanna know is that what about dot net developers in future there is possible they gonna downfall in industry
0 Votes
Je cherche des gens qui parle français pour apprendre le langage c
0 Votes
How can I add gradient to the background
1 Votes