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
n = int(input()) for x in range(1, n): if x % 3 == 0 and x % 5 == 0: print("SoloLearn") elif x % 3 == 0:
@python
-1 Vote
14 Réponses
3rd Jun 2021, 12:14 PM
Gold samuel
___ even(x): if x%2 == 0: _____("Yes") _____ print("No")
function
hel
p
-3 Votes
4 Réponses
4th Aug 2020, 2:51 PM
Federico Pacal Sarmiento Bunimov
Def sum(a,b): If a==0 or b==0: Return 0: Return 1+sum(a-1,b-1): Print (sum(4,2))
1
answer
explain
is
0 Vote
10 Réponses
9th May 2020, 5:15 PM
Colonel Cop
What's wrong with " if button = 0: " ?
python
python3
0 Vote
5 Réponses
14th Sep 2017, 3:56 PM
Sqad0ra
Consider the following function fdef f(m): if m == 0: return(1) else: return(m*f(m-1))
python3
3 Votes
7 Réponses
16th Feb 2018, 3:21 AM
I Am a Baked Potato
def ChangeVal(M,N): for i in range(N): if M[i]%5 = = 0: M[i] //= 5 if M[i]%3 = = 0: M[i] //= 3 L=[25,8,75,12] ChangeVal(L
python
-4 Votes
3 Réponses
5th Oct 2020, 4:31 AM
Arpan Pradhan
def sum (a,b): if a == 0 or b == 0: return 0
function-arguments
2 Votes
5 Réponses
19th Oct 2022, 9:23 AM
Eren Kılıçlar
i = 3 while i >= 0: print(i) i = i - 1
loops
2 Votes
6 Réponses
16th Apr 2018, 5:49 PM
Elisha Miracle
n = int(input()) for x in range(1, n): if x % 3 == 0 and x % 5 == 0: print("SoloLearn") elif x % 3 == 0:
a
-1 Vote
2 Réponses
5th Dec 2020, 7:44 AM
Augustine Ansah Owusu
def power(x, y): if y == 0: return 1 else: return x * power(x, y-1) print(power(2, 3))
memorization
recursion
2 Votes
9 Réponses
11th May 2019, 9:51 AM
Магомед Акуев
def convert(num): if num == 0: return 0 else: return (num % 2 + 10 * convert(num // 2))
python
recursion
5 Votes
13 Réponses
3rd Sep 2022, 6:01 PM
Mohammad Faiz
n = int(input()) length = 0 while n > 0: n //= 10 length += 1 print(length)
python3
0 Vote
4 Réponses
17th Oct 2020, 2:46 AM
Rahul Prasad
# take the number as input number = int(input()) while number <= 0: print(number) number = number - 1
python
5 Votes
7 Réponses
30th May 2023, 6:45 PM
Arooj Amina
seats = 100 (blank) seats > 0: print "sell ticket" (blank) = seats - 1
python
0 Vote
2 Réponses
14th Feb 2025, 2:32 PM
ameer shaik
def even(x): if x%2 == 0: print ("Yes") _____ print("No")? should be
functions
python
-4 Votes
1 Réponse
7th Jun 2018, 5:29 AM
Saurav nalla
Consider the following function fdef f(m): if m == 0: return(1) else: return(m*f(m-1)) Which of the following is correct?
python
0 Vote
10 Réponses
7th Feb 2018, 2:45 AM
kamalesh vra
Python print(chr(128)) UnicodeEncodeError: 'ascii' codec can't encode character '\x80' in position 0: ordinal not in range(128)
ascii
unicodeencodeerror
0 Vote
6 Réponses
26th Nov 2018, 6:40 PM
Dimitris K
for n in range(2,10): for x in range(2,n): if n%x == 0: print(n,'is',x,'*',n//x) please interpret this
functions
0 Vote
4 Réponses
30th Dec 2019, 4:13 PM
Desmond
What is wrong with this code please:n = 100 i = 1 while i <= n: if i % 2 == 0: continue print(i) i+=1
christian
huml
2 Votes
15 Réponses
13th Mar 2022, 1:56 PM
Lean R1
print('Hello world!') x = 1 while x < 10: if x%2 == 0: print(str(x) + " is even") else: print(str(x) + " is odd")
control
flow
0 Vote
2 Réponses
3rd May 2021, 9:16 AM
Faiq Ali
def h(n): f = 0 for i in range(1,n+1): if n%i == 0: f = f + 1 return(f == 2)
python3
0 Vote
5 Réponses
16th Feb 2018, 3:20 AM
I Am a Baked Potato
x = 1 while x < 10: if x%2 == 0: print(str(x) + " is even") else: print(str(x) + " is odd") elif:
help
3 Votes
7 Réponses
12th Aug 2020, 2:27 AM
Hacker Tamil Tamila
[ Done ] case 0: what is the most efficient way of fitting the canvas to mobile screen? please Share me your personal experience
canvas
fit
innerheight
innerwidth
mobile
window
4 Votes
14 Réponses
8th Apr 2022, 12:00 PM
NonStop CODING
siblings = int(input()) popsicles = int(input()) #your code goes here if popsicles % 2 == 0: print("give away") else:
helpwithsolution
0 Vote
2 Réponses
6th Jul 2022, 4:42 AM
shifa
what will come in the place of Questions mark (?)only one letter will come in the place of (?) mark num = input(":") if float(num) ? 0: raise ValueError("Negative")
functions
python
range
variables
-4 Votes
14 Réponses
17th Aug 2016, 9:17 AM
Blackhat
x = 1 while x < 10: if x%2 == 0: print(str(x) + "hallo") else: print(str(x) + "world") x += 1
help
2 Votes
2 Réponses
15th Aug 2020, 2:46 AM
Hacker Tamil Tamila
list = list(range(101)) i = 0 while i <= 100: m = i%2 if m == 0: index = list[i] print(index) i = i + 1
loops
while
1 Vote
9 Réponses
16th Apr 2019, 5:56 AM
ALBERT SAURAV
nums = [1, 22, 35, -21, 45, 16, 18] for num in nums: if num % 2 == 0: continue print(num)
code
modules
numeric-operations
python
python3
0 Vote
1 Réponse
26th Jun 2021, 12:37 PM
Md Nazim Uddin Sagor
Please is to be added or removed from this code n = int(input()) for x in range(1, n): if x % 3 == 0 and x % 5 == 0:
@python
0 Vote
10 Réponses
4th Jan 2023, 1:04 AM
Ohanenye Kennedy
Hello guys some one help me explain this while loop x = 1 while x < 10: if x%2 == 0: print(str(x) + " is even")
python3
1 Vote
3 Réponses
10th Aug 2020, 8:08 AM
Akatwijuka Allan
seats = 10# initial number of seats while seats > 0: # seat available? print("Sell ticket") # ticket sold seats = seats - 1
python
0 Vote
1 Réponse
5th Jun 2023, 4:31 AM
Sujay Chatterjee
Hi! I'm a newbie here, just wanna ask about what does this sign "%" do in these codes, def even (x) if x % 2 == 0: ?
functions
python
1 Vote
5 Réponses
31st Mar 2017, 1:20 AM
Arvin Orpilla
Please check out the code and explain to me how the break and continue loops works and I'm also confused with the i <= 0:
phyton
0 Vote
1 Réponse
29th Jun 2022, 10:23 PM
MAnny
i am not getting correct even odd numbers count from given range of numbers (range -5 to 7)...
(i%2)
+
+1
=
==
0
0:
1
a
b
b+1):
count
else:
even
even_count
for
i
if
in
int(input())
odd
odd_count
print(even_count)
print(odd_count)
range(a
0 Vote
3 Réponses
23rd Feb 2021, 9:58 AM
anil jampani
Poser une question
Poser une question
Poser une question
Poser une question
Aujourd'hui en vedette
My codebits section is full of deleted codes
12 Votes
Why so many mathematical questions in challenges?
0 Votes
Where did mess up....
1 Votes
Ai generated practices
1 Votes
I have an error in a problem and I don't know what the correct answer is
1 Votes
Feedback on my portfolio
0 Votes
I need a siren sound
0 Votes
Yo this is madness
0 Votes
best language if i want to learn about AI
0 Votes
How can i insert files?
1 Votes