Computers and Technology

1: Comparisons, and logical operators Each of the questions below uses the variable height (which you do not get to see yet) to determine how you should set other variables.
ans_3example (we provide code for this one, as an example): If height is...
a string, equal to 'tall', set ans_3example to 2.0 (float)
a string, equal to 'short', set ans_3example to 1.0 (float)
an integer, set ans_3example to height converted to a float
a float, set ans_3example to height
otherwise set ans_3example to None
ans_3a: if height if a float, set and_4a to 'Float', otherwise, 'No'
ans_3b: if height is...
an integer greater than or equal to 18, then set ans_3b to 'voting age',
2: loop
Use a for-loop to build an output list (out_list) given some input list (in_list). Each element of the out_list list should be the integer 1 (if the corresponding element of in_list is a number (integer or float) or the integer 0 otherwise.
an integer less than 18, then set ans_3b to 'not yet voting',
is a float set ans_3b to "integer years only please",
anything else, set ans_3b to 'numbers please'
ans_3c: if height is an integer or a float, then set to height*4 otherwise to None.
Q3: Cleaning, Specification
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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:30, DivineMemes420
What type of computer network ensures high security ?
Answers: 1
image
Computers and Technology, 22.06.2019 11:40, malibu777
Design a pos circuit that displays the letters a through j on a seven-segment indicator. the circuit has four inputs w, x, y, and z which represent the last 4 bits of the uppercase ascii code for the letter to be displayed. thus, if wxyz = 0001 then "a" will be displayed. (any answer with 22 or fewer gates and inverters, not counting any for the inputs, is acceptable)
Answers: 2
image
Computers and Technology, 23.06.2019 16:10, alexis9658
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
image
Computers and Technology, 24.06.2019 01:30, tanya44737
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
Do you know the correct answer?
1: Comparisons, and logical operators Each of the questions below uses the variable height (which y...

Questions in other subjects:

Konu
Mathematics, 29.07.2021 17:20
Konu
Mathematics, 29.07.2021 17:20
Konu
Mathematics, 29.07.2021 17:20