1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
slavikrds [6]
3 years ago
14

The function below takes a single parameter, a list of numbers called number_list. Complete the function to return a string of t

he provided numbers as a series of comma separate values (CSV). For example, if the function was provided the argument [22, 33, 44], the function should return '22,33,44'. Hint: in order to use the join function you need to first convert the numbers into strings, which you can do by looping over the number list to create a new list (via append) of strings of each number.
Engineering
1 answer:
makkiz [27]3 years ago
6 0

Answer:

The solution code is written in Python:

  1. def convertCSV(number_list):
  2.    str_list = []
  3.    for num in number_list:
  4.        str_list.append(str(num))
  5.    
  6.    return ",".join(str_list)
  7. result = convertCSV([22,33,44])
  8. print(result)

Explanation:

Firstly, create a function "convertCSV" with one parameter "number_list". (Line 1)

Next, create an empty list and assign it to a new variable <em>str_list</em>. (Line 2)

Use for-loop to iterate through all the number in the <em>number_list</em>.(Line 4). Within the loop, each number is converted to a string using the Python built-in function <em>str() </em>and then use the list append method to add the string version of the number to <em>str_list</em>.

Use Python string<em> join() </em>method to join all the elements in the str_list as a single string. The "," is used as a separator between the elements (Line 7) . At the end return the string as an output.

We can test the function by calling the function and passing [22,33,34] as an argument and we shall see "22,33,44" is printed as an output. (Line 9 - 10)

You might be interested in
Name the main classes of polymer and define their characteristic properties
Svetlanka [38]

Answer:

Polymers are the naturally occurring or synthetic macromolecules that are composed of repeating subunits, called monomers.

The three main classes of polymers are: thermoplastic, thermosetting, and the elastomers.

Thermoplastic polymers have linear bonding. These polymers can be melted again and thus can recycled.

Thermosetting polymers have cross-linked bonding. These polymers decompose when heated and thus can not be remelted and recycled.

Elastomers have linear bonding with some cross-linking. These polymers extreme elastic extensibility and thus can revert back to its original shape after deformation, without causing any permanent damage.

8 0
4 years ago
Of the following answers, which is NOT a way for employees to control exposure routes?
Katena32 [7]

Answer:  Of the following answers, which is NOT a way for employees to control exposure routes?

Explanation:

4 0
3 years ago
Brainiest and 35 points for the RIGHT ANSWER
Mumz [18]
A level it’s the only one that makes sense
5 0
3 years ago
Keep an emergency kit and fresh water in your car in the event of _____.
Ipatiy [6.2K]

Answer:

A blizzard

Explanation:

You could be trapped in your car for days

5 0
3 years ago
A 5-mm-thick stainless steel strip (k = 21 W/m•K, rho = 8000 kg/m3, and cp = 570 J/kg•K) is being heat treated as it moves throu
Drupady [299]

Answer:

The temperature of the strip as it exits the furnace is 819.15 °C

Explanation:

The characteristic length of the strip is given by;

L_c = \frac{V}{A} = \frac{LA}{2A} = \frac{5*10^{-3}}{2} = 0.0025 \ m

The Biot number is given as;

B_i = \frac{h L_c}{k}\\\\B_i = \frac{80*0.0025}{21} \\\\B_i = 0.00952

B_i < 0.1,  thus apply lumped system approximation to determine the constant time for the process;

\tau = \frac{\rho C_p V}{hA_s} = \frac{\rho C_p L_c}{h}\\\\\tau = \frac{8000* 570* 0.0025}{80}\\\\\tau = 142.5 s

The time for the heating process is given as;

t = \frac{d}{V} \\\\t = \frac{3 \ m}{0.01 \ m/s} = 300 s

Apply the lumped system approximation relation to determine the temperature of the strip as it exits the furnace;

T(t) = T_{ \infty} + (T_i -T_{\infty})e^{-t/ \tau}\\\\T(t) = 930 + (20 -930)e^{-300/ 142.5}\\\\T(t) = 930 + (-110.85)\\\\T_{(t)} = 819.15 \ ^0 C

Therefore, the temperature of the strip as it exits the furnace is 819.15 °C

5 0
3 years ago
Other questions:
  • If engineering is easy then why don't most people join?
    15·2 answers
  • You are driving on a roadway with multiple lanes of travel in the same direction, and are approaching an emergency vehicle parke
    11·1 answer
  • Design an op amp circuit to average the input of six sensors used to measure temperature in restaurant griddles for a large fast
    7·1 answer
  • I got a rubber band car assigned as a project today. The goal is for the car to go farther/faster than the car my teacher is mak
    6·1 answer
  • Determine size of a standard square key made of 1045 hot rolled steel for a 2 inch DIA shaft transmitting 100 HP at 500 rpm with
    12·1 answer
  • The map shows the distribution of dairy farms across the lower 48 of the United States. Each dot on the map represents approxima
    11·1 answer
  • In what particular setting is this used or prepared?​
    13·1 answer
  • Paragraph about Mercedes jellinek
    14·1 answer
  • a crawler tractor is operated by a 180-hp diesel engine. calculate the probable gallons of fuel consumed per hr for each of the
    6·1 answer
  • engineering controls are devices such as self sheathing needles and sharps containers to block or eliminate the sharp risk. true
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!