0
control structures
I have a question on the code project of control structures chapter in python
10 Answers
+ 3
#try this
n=int(input())
for x in range(1,n):
if x%2==0:
continue
if x%3==0 and x%5==0:
print("SoloLearn")
elif x%3==0:
print("Solo")
elif x%5==0:
print("Learn")
else:
print(x)
+ 1
don't ask to ask, just ask
+ 1
ndatinya justin copy the code and paste here let's help you debug...
And if you haven't started the code or written anything, that means you do not understand that course.
##Go back and review the course again
+ 1
ndatinya justin your problems are;
1. Your identations are wrong from if...(hope you know what's identation)
2. You didn't put colon at the end of the elif's
+ 1
it's also running ,thank you Simba
0
I m sorry if i m not clear , i just cant answer the code project
0
n=int(input())
for x in range (1,n):
if x % 3==0 and x % 5 ==0:
print("solo learn")
elif x % 2 ==0
continue
elif x % 3==0
print("solo")
elif x % 5 ==0
print("learn")
0
ndatinya justin this is the correct code
n=int(input())
for x in range (1,n):
if x % 3==0 and x % 5 ==0:
print("solo learn")
elif x % 2 ==0:
continue
elif x % 3==0:
print("solo")
elif x % 5 ==0:
print("learn"
0
Thank you Ejeh Joseph it's running
0
I have another question on the code project of function and modules
my code is
celsius=int(input())
fahrenheit=int(input())
def conv(c):
celcius=9/5+32
fahrenheit=conv(celcius)
print(fahrenheit)