Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using python. I was wondering if I could an explanation and how to do the example listed below. Below that picture, is an attachment of
Using python. I was wondering if I could an explanation and how to do the example listed below. Below that picture, is an attachment of what is required.
An example of running the program might be as follows. The following IS NOT output from running the program, so there may be typos. Please enter a numeric value: 14 14 is a whole number 14 is not a multiple of 5 14 is positive 14 is not within the range of 2010 to 2019 14 is not within the 100's Please enter a text value: whatever whatever has 8 characters whatever is neither yes or no whatever is not yes or YES whatever does not start with an 'a' Running it again might look like: Please enter a numeric value: -100 -100 is a whole number - 100 is a multiple of 5 - 100 is negative -100 is not within the range of 2010 to 2019 - 100 is not within the 100's Please enter a text value: almost almost has 6 characters almost is neither yes or no almost is not yes or YES almost does start with an 'a' Each input should generate a line of output for each of the specified tests. Do each test independent of the other tests. Have the user enter a numeric value. For that number, tell if: a) the value entered is a whole number (hint: cast to an int) e.g. 4.5 is not a whole number or 3 is a whole number b) the value is, or is not, a multiple of 5 c) the value is even or odd d) the value is positive, negative, or zero e) the value is, or is not, within the range of 2010 to 2019 inclusive f) the value is, or is not, within the 100's, meaning is it a three-digit number which starts with 1. This can be done at least two different way. Feel free to challenge yourself to find both ways. No bonus points, just bonus knowledge. Then have the user enter a text value. For that string, tell: g) how many characters are in the string h) if the string entered is "yes", "no", or neither of those words (case-specific) i) if the string entered is 'yes', either upper- or lower-case j) if the string starts with a lower case 'a'. Keep in mind that ANY string that starts with an 'a' is considered to be less than any string that starts with a 'b'. Each of the points listed above should generate one output statementStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started