subject

Take a list of heights (in_lst) in different formats, for each one calculate height in milimeters (integer), and store it, or None (is not compliant with known format) in output list (out_list).Input: a list raw_lst of elements of many types: floats, ints, strings, bools, and potentially other weird data types. Particular value ranges of floats and ints represent heights in different formats:float between 2.75 and 9 (exclusive) indicates height in feet. float between 0.83 and 2.75 (exclusive) indicates height in meters. float between 12 and 108 (exclusive) indicates height in inches. integer between 83 and 275 (inclusive) indicates height in centimeters. integer between 830 and 2750 (inclusive indicates height in milimeters. Output: a list out_list of the same length as in_list. Each element of this list derives from a specific element of the in_list. Each element is either (a) an integer, corresponding to the index-matched element of in_list converted to height, in milimeters, or (b) None. Units: 1 foot = 12 inches; 1 inch = 2.54 cm; 1 meter = 100 cm; 1 cm = 10 mm;in_list = [5.5, 1.8, 69.5, 167, 2000, 6, 'six feet', '2 meters', b'4a', (5, 8), {'height':69}]out_list == [1676, 1800, 1765, 1670, 2000, None, None, None, None, None, None]

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:50
A911 dispatcher is the sole sender of messages to all police officers. while on patrol, officers communicate with the dispatcher who, in turn, relays messages to other officers. the officers do not communicate directly with one another. this illustrates a network.
Answers: 1
question
Computers and Technology, 23.06.2019 18:20
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
question
Computers and Technology, 23.06.2019 23:00
Computer programming is one type of what career
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
Explain the importance of html in web page designing in 20 sentences..
Answers: 1
You know the right answer?
Take a list of heights (in_lst) in different formats, for each one calculate height in milimeters (i...
Questions
question
Mathematics, 18.09.2020 20:01
question
English, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Physics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
English, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
question
Mathematics, 18.09.2020 20:01
Questions on the website: 13722363