control structures | Sololearn: Learn to code for FREE!

0

control structures

I have a question on the code project of control structures chapter in python

7/17/2021 3:44:10 PM

ndatinya justin

10 Answers

New Answer

+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)

+2

don't ask to ask, just ask

+2

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

+2

it's also running ,thank you Simba

+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

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)