Courses
Courses
Code Compiler
Code Compiler
Discuss
Pricing
Teams
Log in
Register
Menu
Q&A Discussions
Search
Search
Ask a question
Ask a 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 Answers
3rd Jun 2021, 12:14 PM
Gold samuel
___ even(x): if x%2 == 0: _____("Yes") _____ print("No")
function
hel
p
-3 Votes
4 Answers
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 Votes
10 Answers
9th May 2020, 5:15 PM
Colonel Cop
What's wrong with " if button = 0: " ?
python
python3
0 Votes
5 Answers
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 Answers
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
2 Answers
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 Answers
19th Oct 2022, 9:23 AM
Eren Kılıçlar
i = 3 while i >= 0: print(i) i = i - 1
loops
2 Votes
6 Answers
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 Answers
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 Answers
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 Answers
3rd Sep 2022, 6:01 PM
Mohammad Faiz
n = int(input()) length = 0 while n > 0: n //= 10 length += 1 print(length)
python3
0 Votes
4 Answers
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 Answers
30th May 2023, 6:45 PM
Arooj Amina
def even(x): if x%2 == 0: print ("Yes") _____ print("No")? should be
functions
python
-4 Votes
1 Answer
7th Jun 2018, 5:29 AM
Saurav nalla
seats = 100 (blank) seats > 0: print "sell ticket" (blank) = seats - 1
python
0 Votes
2 Answers
14th Feb 2025, 2:32 PM
ameer shaik
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 Votes
10 Answers
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 Votes
6 Answers
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 Votes
4 Answers
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 Answers
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 Votes
2 Answers
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 Votes
5 Answers
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 Answers
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 Answers
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 Votes
2 Answers
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 Answers
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 Answers
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 Answers
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 Votes
1 Answer
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 Votes
10 Answers
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 Answers
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 Votes
1 Answer
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 Answers
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 Votes
1 Answer
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 Votes
3 Answers
23rd Feb 2021, 9:58 AM
anil jampani
Ask a question
Ask a question
Ask a question
Ask a question
Hot today
New code
1 Votes
Does anyone have the solution for this challenge?
1 Votes
How would you solve the part of the C# Intermediate code project that requires operator overloading?
0 Votes
Why does coding take so long to learn
0 Votes
Solved Ai generated practice the last question
0 Votes
Hello Everyone
0 Votes
Solved# Survey data format in coding for data
0 Votes
How to add unordered lists in HTML.
0 Votes
What is the use of .kt classes in the React Native project
0 Votes
Solved #Relay race coding for unit 9 you are creating code for a relay race
0 Votes