JAFFA-PROBLEM


Submit solution

Points: 10 (partial)
Time limit: 5.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
Python

Python If-Else

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

Input Format A single line containing a positive integer, .

Constraints

Output Format Print Weird if the number is weird; otherwise, print Not Weird .


Comments


  • 1
    CBENU4MEE19216  commented on Aug. 25, 2020, 12:44 p.m.

    n = int(input()) if n % 2 == 1: print("Weird") elif n % 2 == 0 and 2 <= n <= 5: print("Not Weird") elif n % 2 == 0 and 6 <= n <= 20: print("Weird") else: print("Not Weird")


  • 0
    CBENU4CSE19632  commented on July 31, 2020, 6:18 a.m.

    THe question is not clearr


  • 0
    U4CSE17107  commented on Nov. 6, 2019, 10:01 p.m.

    a=int(input()) l=[] for i in range(0,a): b=input() x=b.split() if(x[0]=='insert'): t=int(x[1]) l.insert(t,int(x[2])) if(x[0]=='print'): print(l) if(x[0]=='append'): l.append(int(x[1])) if(x[0]=='pop'): l.pop() if(x[0]=='reverse'): l.reverse() if(x[0]=='sort'): l.sort() if(x[0]=='remove'): l.remove(int(x[1]))


  • 0
    Kruthikpavan123  commented on July 29, 2019, 4:08 p.m. edited

    .