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.
#!/bin/python3if__name__=='__main__':n=int(input().strip())# Checks if the number is odd or if it is even and between 6 and 20, inclusive. is_odd=(n%2!=0)is_inclusive_range=(6<=n<=20)# Print "Weird" when 'weird' conditional is True. Otherwise, it sets it to "Not Weird".weird_status="Weird"if(is_oddoris_inclusive_range)else"Not Weird"print(weird_status)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 3: Intro to Conditional Statements
You are viewing a single comment's thread. Return to all comments →