We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Introduction
- Python If-Else
- Discussions
Python If-Else
Python If-Else
Sort by
recency
|
3947 Discussions
|
Please Login in order to post a comment
number=int(input("enter the number:") if number%2==0: print("Not weird") if number==2<=5: print("Not wired") if number==6<=20: print("Weird") else: print("weird") what's wrong in this w
n=int(input()) if n%2!=0: print("Weird") elif n in range(2,6): print("Not Weird") elif n in range(6,21): print("Weird") elif n>20: print("Not Weird") else: print("Weird")
n = int(input('Enter an integer: ')) if (n%2)!=0 : print('Weird') elif (n%2)==0 : if n>1 and n<6: ptint('not weird') elif n>5 and n<21: print('weird') elif n > 20: print('not weird')
help please, if name == 'main': n = int(input().strip()) if n % 2 != 0: print("Weird") else n % 2 == 0 and n in range(2, 5): print("Not Weird") else n % 2 == 0 and n in range(6, 20): print("Weird")