We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 05ddc09 + 8319e51 commit 7c573acCopy full SHA for 7c573ac
Hackerrank_Python_Domain.png
-19.4 KB
Introduction/PythonIfElse.py
@@ -2,24 +2,18 @@
2
Title : Python If-Else
3
Subdomain : Introduction
4
Domain : Python
5
-Author : Ahmedur Rahman Shovon
6
-Created : 15 July 2016
+Author : Utkarsh Mishra
+Created : 27 Jan 2021
7
Problem : https://www.hackerrank.com/challenges/py-if-else/problem
8
'''
9
#!/bin/python3
10
11
import sys
12
13
+n = int(input())
14
+if n%2==1 or n in range (5,21):
15
+ print("Weird")
16
+else:
17
+ print("Not Weird")
18
-N = int(input().strip())
-n= N
-w = 'Weird'
-nw = 'Not Weird'
-if n % 2 == 1:
19
- print(w)
20
-elif n % 2 == 0 and (n>=2 and n<5):
21
- print(nw)
22
-elif n % 2 == 0 and (n>=6 and n<=20):
23
24
-elif n % 2 == 0 and (n>20):
25
+
0 commit comments