Курсы
Курсы
Компилятор кода
Компилятор кода
Обсуждения
Teams
Войти
Регистрация
Menu
Обсуждения
Поиск
Поиск
Задать вопрос
Задать вопрос
x=0 i=0 while i<4: x+=i i+=1 print (x)
python
6 голосов
4 ответов
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 голосов
2 ответов
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 голосов
2 ответов
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 голосов
8 ответов
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 голосов
1 ответ
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 голосов
35 ответов
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 голосов
2 ответов
24th Jul 2022, 10:39 AM
Irshad Ahmad
Why not make int i=0 while initializing? I dont get that logic.
java
0 голосов
2 ответов
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 голос
11 ответов
6th Feb 2022, 3:40 PM
mahdi
i=0 cout<< i++ << ++i << i; why the output is 122...shouldnt it be 022.?
c++
1 голос
4 ответов
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 голосов
8 ответов
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 голосов
2 ответов
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 голосов
2 ответов
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 голосов
3 ответов
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 голос
2 ответов
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 голосов
5 ответов
20th Jul 2017, 2:04 PM
paul mwengei
Задать вопрос
Задать вопрос
Задать вопрос
Задать вопрос
Актуальное сегодня
Help please?
3 Votes
How to get better with problem-solving and programming
1 Votes
Ejercicio Pytho
0 Votes
Odd even threads without condition variable
0 Votes
Online voting system
2 Votes
What is that z for
0 Votes
Bug on "Java for Beginners Module 3 Quiz"
1 Votes
Suggestions needed
4 Votes
SQL practice
2 Votes
Game development
0 Votes