Hii, ps anyone solve this problem, using condition function in python...I have been tried lot but those are throwing me syntax e | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

Hii, ps anyone solve this problem, using condition function in python...I have been tried lot but those are throwing me syntax e

Given an integer,n Ā , perform the following conditional actions: IfĀ Ā n is odd, printĀ Weird IfĀ nĀ is even and in the inclusive range ofĀ Ā toĀ , printĀ Not Weird If nĀ Ā is even and in the inclusive range ofĀ Ā toĀ , printĀ Weird If nĀ Ā is even and greater thanĀ , printĀ Not Weird

27th Mar 2020, 11:48 AM
HĆ«llo WƶrldšŸ”°
HĆ«llo WƶrldšŸ”° - avatar
7 Respostas
+ 4
JayakrishnašŸ‡®šŸ‡³ Actually i also don't know, what is inclusive range, its from hacker rank.. My codes are lot of error lol little bit feeling shame to sharešŸ˜…, anyway here bit https://code.sololearn.com/csDgvRPw29Xm/?ref=app
27th Mar 2020, 12:04 PM
HĆ«llo WƶrldšŸ”°
HĆ«llo WƶrldšŸ”° - avatar
+ 2
If you show your try which producing errors then someone try to correct it.. So please share your try... Please recheck about your description.. It have 2 conditions are same for if, are you missing anything or a typo..? What is inclusive range..?
27th Mar 2020, 11:57 AM
Jayakrishna šŸ‡®šŸ‡³
+ 2
JayakrishnašŸ‡®šŸ‡³ thank u very much, I can see my errors,
27th Mar 2020, 12:44 PM
HĆ«llo WƶrldšŸ”°
HĆ«llo WƶrldšŸ”° - avatar
27th Mar 2020, 12:32 PM
Jayakrishna šŸ‡®šŸ‡³
+ 1
šŸ‘‘KunyušŸ‘‘ You're Wel come.. Feel free to ask even if it basic or not.. Always first try by yourself. If you stuck between then ask community by posting your try that may have errors.. Just tell what you know, and what you want to know. Some one definitely answer.. Happy coding..
27th Mar 2020, 12:53 PM
Jayakrishna šŸ‡®šŸ‡³
0
šŸ‘‘KunyušŸ‘‘ OK. Post that try.. Which have errors.. If n%2== 1 : print("weird") if(n%2==0 and 0<n>10) #inclusive range for example 0 to 10 print("not weird") elif n%2==0 and 0>n<10: print("weird") else print("Not weird") //this will not printed according to your description, it is not clear. A sample, make identation, post your tried code. Better to link that hacker rank page.
27th Mar 2020, 12:18 PM
Jayakrishna šŸ‡®šŸ‡³