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