+ 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
7 Respuestas
+ 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
+ 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..?
+ 2
Jayakrishna🇮🇳 thank u very much, I can see my errors,
+ 1
👑Kunyu👑
Check out this one's...
https://code.sololearn.com/cNV3RTDQwD2r/?ref=app
+ 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..
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.