Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please follow the directions carefully. Do not use the constructs prohibited in the above list. This includes the append function. Also use the template listed

image text in transcribedimage text in transcribedplease follow the directions carefully. Do not use the constructs prohibited in the above list. This includes the append function. Also use the template listed below when writing your code. Please do your work in python IDLE

image text in transcribed

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 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():| main()

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

Database And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 1 Lncs 8055

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013 Edition

3642402844, 978-3642402845

More Books

Students also viewed these Databases questions

Question

a. When did your ancestors come to the United States?

Answered: 1 week ago

Question

d. What language(s) did they speak?

Answered: 1 week ago

Question

e. What difficulties did they encounter?

Answered: 1 week ago