Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedDO NOT USE MAX OR MINimage text in transcribed

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 condition

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions

Question

2. Discuss the steps in preparing a manager to go overseas.

Answered: 1 week ago