Answered step by step
Verified Expert Solution
Question
1 Approved Answer
DO NOT USE MAX OR MIN Q4. Write a function called greatest_integer( ) that takes in three parameters (A,B,C) and uses logical operators to determine
DO NOT USE MAX OR MIN
Q4. Write a function called greatest_integer( ) that takes in three parameters (A,B,C) and uses logical operators to determine the largest and the smallest number among these three. The function should return the largest and the smallest number in the form of a list which is supposed to be arranged in descending order examples are shown below: Input: (100,3,1) Output: [100,1] Input: (3,4,4) Output: [4, 3] the entire submission (assignment, timed test, etc.). The restricted items are as fo - Concepts not discussed in lectures yet - String functions - Member functions - Exceptions (can use) : len () and x=x+[y1,y2,y3] - Built-in functions \& types - Exceptions (can use): str( ), readline( ), open( ), close( ), write( ), read( ), range - Cannot use .append, .sort, etc. - Cannot use "Slicing" - Cannot use "list comprehension" - Cannot use "not in" (together) - Cannot use "in" - not allowed with conditionals - Exception (can use): with range () - Cannot use and \{\} - Exception (can use): mathematical operations (multiply \& exponents) - Data type functions - Exceptions (can use): int( ), str ( ), float () - Break - Continue - Nested Constructs - Exceptions (can use): 2-D list - Multiple returns \& Multiple assignments - Recursion (not allowed unless the question explicitly states otherwise) - Functions within functions (Definitions) -- invocation is fine - Default Parameters - Global variables - Keyword as variable names - while true or without prober conditionStep 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