Question: Objective: To work with basic input-output and decision-making commands. Assignment: Ask the user to enter a numeric value. 1. For the entered value, check if:
Objective: To work with basic input-output and decision-making commands. Assignment: Ask the user to enter a numeric value. 1. For the entered value, check if: a) the value entered is a whole number. For example: 4.5 is not a whole number but 3 is a whole number. b) the value is, or is not, a multiple of 7. c) the value is positive, negative, or zero. d) the value is, or is not, within the range of 2011 to 2021(inclusive) e) the value is, or is not within the 1000's, meaning is it a four-digit number. (This can be done at least two different ways. Feel free to challenge yourself to find both ways. No bonus points, just bonus knowledge). 2. Then ask for a second value. Using both values, tell: f) which of the two values is the smallest, or if they are equal? e.g., "first value is smaller" or "second value is smaller" or "the two values are equal." g) if the second value is, or is not, a multiple of the first value. h) if the first value is, or is not, a multiple of the second value. Each of the points listed above should generate one output statement. Instructions: This will be done using Python 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
