Cursos
Cursos
Compilador de Código
Compilador de Código
Discutir
Preços
Teams
Fazer login
Registrar
Menu
Q&A Discussões
Pesquisar
Pesquisar
Faça uma pergunta
Faça uma pergunta
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 Voto
14 Respostas
3rd Jun 2021, 12:14 PM
Gold samuel
___ even(x): if x%2 == 0: _____("Yes") _____ print("No")
function
hel
p
-3 Votos
4 Respostas
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 Voto
10 Respostas
9th May 2020, 5:15 PM
Colonel Cop
What's wrong with " if button = 0: " ?
python
python3
0 Voto
5 Respostas
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 Votos
7 Respostas
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 Votos
3 Respostas
5th Oct 2020, 4:31 AM
Arpan Pradhan
def sum (a,b): if a == 0 or b == 0: return 0
function-arguments
2 Votos
5 Respostas
19th Oct 2022, 9:23 AM
Eren Kılıçlar
i = 3 while i >= 0: print(i) i = i - 1
loops
2 Votos
6 Respostas
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 Voto
2 Respostas
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 Votos
9 Respostas
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 Votos
13 Respostas
3rd Sep 2022, 6:01 PM
Mohammad Faiz
n = int(input()) length = 0 while n > 0: n //= 10 length += 1 print(length)
python3
0 Voto
4 Respostas
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 Votos
7 Respostas
30th May 2023, 6:45 PM
Arooj Amina
seats = 100 (blank) seats > 0: print "sell ticket" (blank) = seats - 1
python
0 Voto
2 Respostas
14th Feb 2025, 2:32 PM
ameer shaik
def even(x): if x%2 == 0: print ("Yes") _____ print("No")? should be
functions
python
-4 Votos
1 Resposta
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 Voto
10 Respostas
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 Voto
6 Respostas
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 Voto
4 Respostas
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 Votos
15 Respostas
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 Voto
2 Respostas
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 Voto
5 Respostas
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 Votos
7 Respostas
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 Votos
14 Respostas
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 Voto
2 Respostas
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 Votos
14 Respostas
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 Votos
2 Respostas
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 Voto
9 Respostas
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 Voto
1 Resposta
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 Voto
10 Respostas
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 Voto
3 Respostas
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 Voto
1 Resposta
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 Voto
5 Respostas
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 Voto
1 Resposta
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 Voto
3 Respostas
23rd Feb 2021, 9:58 AM
anil jampani
Faça uma pergunta
Faça uma pergunta
Faça uma pergunta
Faça uma pergunta
Quente hoje
My codebits section is full of deleted codes
12 Votes
Why so many mathematical questions in challenges?
0 Votes
Ai generated practices
1 Votes
Where did mess up....
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
How can i insert files?
1 Votes
Patters of library class
0 Votes