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.
Day 3: Intro to Conditional Statements
Day 3: Intro to Conditional Statements
Sort by
recency
|
1768 Discussions
|
Please Login in order to post a comment
please vote me up: (JAVASCRIPT)
There's no need to bother with the 'Not Weird' conditionals because else will catch everything that is not 'Weird'.
if n%2==0: if (n>=2 and n<=5) or(n>20): print("Not Weird") else: if n>=6 or n<=20: print("Weird") else: print("Weird")