Objective In this challenge, we're getting started with conditional statements. Check out the Tutorial tab for learning materials and an instructional video! Task Given an integer, n. perform the...


Objective<br>In this challenge, we're getting started with conditional statements. Check out the Tutorial tab for learning materials and an<br>instructional video!<br>Task<br>Given an integer, n. perform the following conditional actions:<br>• Ifn is odd. print Weird<br>• If n is even and in the inclusive range of 2 to 5. print Not Weird<br>• Ifn is even and in the inclusive range of 6 to 20. print weird<br>• Ifn is even and greater than 20. print Not Weird<br>Complete the stub code provided in your editor to print whether or not n is weird.<br>Input Format<br>A single line containing a positive integer. n.<br>Constraints<br>1<n< 100<br>

Extracted text: Objective In this challenge, we're getting started with conditional statements. Check out the Tutorial tab for learning materials and an instructional video! Task Given an integer, n. perform the following conditional actions: • Ifn is odd. print Weird • If n is even and in the inclusive range of 2 to 5. print Not Weird • Ifn is even and in the inclusive range of 6 to 20. print weird • Ifn is even and greater than 20. print Not Weird Complete the stub code provided in your editor to print whether or not n is weird. Input Format A single line containing a positive integer. n. Constraints 1<><>
output Format<br>Print weird if the number is weird otherwise,pe<br>print Not wetrd<br>Sample Input o<br>3.<br>Sample Output0<br>eird<br>Sample ingut 1<br>24<br>Sample Output 1<br>Not Wetrd<br>Explanation<br>Sample Output 1<br>Not Meird<br>Explanation<br>Sample Case 0 n= 3<br>nis odd and odd numbers are weird, so we print woird.<br>Sample Case 1: n=24<br>n> 20 and n is even so it isn't weird. Thus, we print Not eird.<br>

Extracted text: output Format Print weird if the number is weird otherwise,pe print Not wetrd Sample Input o 3. Sample Output0 eird Sample ingut 1 24 Sample Output 1 Not Wetrd Explanation Sample Output 1 Not Meird Explanation Sample Case 0 n= 3 nis odd and odd numbers are weird, so we print woird. Sample Case 1: n=24 n> 20 and n is even so it isn't weird. Thus, we print Not eird.

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here