Question: Code the following using python idle and be sure not to use the constructs in the prohibited list below unless specified in the question above.

Code the following using python idle and be sure not to useCode the following using python idle and be sure not to use the constructs in the prohibited list below unless specified in the question above. Do not use append, int, or input functions.

the constructs in the prohibited list below unless specified in the question

Note: Return values must be assigned to variables before used. All the function invocations must remain with other functions. Finally follow the python idle code template below when answering.

above. Do not use append, int, or input functions. Note: Return values

Write a function gradeit( ) that takes a number x as grade in number and return a letter grade. The valid number range is between 0 and 100 . The function should do the following: - return "A" if number is greater than or equal to 80 - return "B" if number is greater than or equal to 50 - return " C " if number is less than 50 - return "I" if number is out of range Problem-2 Write a function dimensionflip() that takes a list of observations in meters and outputs a list with the corresponding observations in centimeters. Your function should only convert dimensions of positive entries; therefore, a negative dimension in meters must not be changed. For example: Input1: [1,4,5] Output1: [100,400,500] Input2: [5,9,8,6] Output2: [500,900,8,600] The values within the input list should not be changed following a call to this function. directions. Using the following constructs will result in 0 (zero) for the entire submission (assignment, timed test, etc.). The restricted items are as follows: - Concepts not discussed in lectures yet - String functions - Member functions - Exceptions (can use) : /en () and x=x+[y1,y2,y3] - Built-in functions \& types - Exceptions (can use): str( ), readline( ), open(), close( ), write(), read(), range( ), .split() - 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 def gradeit (x) : \# start your code below this line - make more lines if needed \# finish your code above this line return \# use correct return type here def dimensionflip(lst): \# start your code below this line - make more lines if needed \# finish your code above this line return \# use correct return type here def main(): \# function invocation below this line main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!