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
Mandarinka [93]
3 years ago
7

In python, how would I randomize numbers and insert them into a file?

Engineering
1 answer:
BabaBlast [244]3 years ago
7 0
Random integer values can be generated with the randint() function. This function takes two arguments: the start and the end of the range for the generated integer values. Random integers are generated within and including the start and end of range values, specifically in the interval [start, end].
You might be interested in
A counter-flow double-piped heat exchange is to heat water from 20oC to 80oC at a rate of 1.2 kg/s. The heating is to be accompl
lawyer [7]

Answer:

110 m or 11,000 cm

Explanation:

  • let mass flow rate for cold and hot fluid = M<em>c</em> and M<em>h</em> respectively
  • let specific heat for cold and hot fluid = C<em>pc</em> and C<em>ph </em>respectively
  • let heat capacity rate for cold and hot fluid = C<em>c</em> and C<em>h </em>respectively

M<em>c</em> = 1.2 kg/s and M<em>h = </em>2 kg/s

C<em>pc</em> = 4.18 kj/kg °c and C<em>ph</em> = 4.31 kj/kg °c

<u>Using effectiveness-NUT method</u>

  1. <em>First, we need to determine heat capacity rate for cold and hot fluid, and determine the dimensionless heat capacity rate</em>

C<em>c</em> = M<em>c</em> × C<em>pc</em> = 1.2 kg/s  × 4.18 kj/kg °c = 5.016 kW/°c

C<em>h = </em>M<em>h</em> × C<em>ph </em>= 2 kg/s  × 4.31 kj/kg °c = 8.62 kW/°c

From the result above cold fluid heat capacity rate is smaller

Dimensionless heat capacity rate, C = minimum capacity/maximum capacity

C= C<em>min</em>/C<em>max</em>

C = 5.016/8.62 = 0.582

          .<em>2 Second, we determine the maximum heat transfer rate, Qmax</em>

Q<em>max</em> = C<em>min </em>(Inlet Temp. of hot fluid - Inlet Temp. of cold fluid)

Q<em>max</em> = (5.016 kW/°c)(160 - 20) °c

Q<em>max</em> = (5.016 kW/°c)(140) °c = 702.24 kW

          .<em>3 Third, we determine the actual heat transfer rate, Q</em>

Q = C<em>min (</em>outlet Temp. of cold fluid - inlet Temp. of cold fluid)

Q = (5.016 kW/°c)(80 - 20) °c

Q<em>max</em> = (5.016 kW/°c)(60) °c = 303.66 kW

            .<em>4 Fourth, we determine Effectiveness of the heat exchanger, </em>ε

ε<em> </em>= Q/Qmax

ε <em>= </em>303.66 kW/702.24 kW

ε = 0.432

           .<em>5 Fifth, using appropriate  effective relation for double pipe counter flow to determine NTU for the heat exchanger</em>

NTU = \\ \frac{1}{C-1} ln(\frac{ε-1}{εc -1} )

NTU = \frac{1}{0.582-1} ln(\frac{0.432 -1}{0.432 X 0.582   -1} )

NTU = 0.661

          <em>.6 sixth, we determine Heat Exchanger surface area, As</em>

From the question, the overall heat transfer coefficient U = 640 W/m²

As = \frac{NTU C{min} }{U}

As = \frac{0.661 x 5016 W. °c }{640 W/m²}

As = 5.18 m²

            <em>.7 Finally, we determine the length of the heat exchanger, L</em>

L = \frac{As}{\pi D}

L = \frac{5.18 m² }{\pi (0.015 m)}

L= 109.91 m

L ≅ 110 m = 11,000 cm

3 0
3 years ago
1) Find the time in seconds to reach full charge in an RL circuit with L = 5 H and R = 100 ohms
pav-90 [236]

The time constant to reach full charge in an RL circuit is 0.05 ms.

Explanation:

To find the time constant,

The time constant for an RL circuit is defined by τ = L/R.

The given data is

L= 5 H

R= 100 ohms

by using the formula,

τ = L/R

  = 5/100

  = 0.05 ms

τ = 0.05 ms

Thus, the time constant to reach full charge in an RL circuit is 0.05 ms.

8 0
3 years ago
Consider the following incomplete code segment, which is intended to print the sum of the digits in num. For example, when num i
ValentinkaMS [17]

Answer:

A) while (num >= 0)

Explanation:

To understand why we need to focus on the module and division operation inside the loop. num % 10 divide the number by ten and take its remainder to then add this remainder to sum, the important here is that we are adding up the number in reverse order and wee need to repeat this process until we get the first number (1%10 = 1), therefore, num need to be one to compute the last operation.

A) this is the correct option because num = 1 > 0 and the last operation will be performed, and after the last operation, num = 1 will be divided by 10 resulting in 0 and 0 is not greater than 0, therefore, the cycle end and the result will be printed.

B) This can not be the option because this way the program will never ends -> 0%10 = 0 and num = 0/10 = 0

C) This can not be the option because num = 1 > 1 will produce an early end of the loop printing an incomplete result

D) The same problem than C

E) There is a point, before the operations finish, where sum > num, this will produce an early end of the loop, printing an incomplete result

6 0
3 years ago
What is the last step to the design process?
ryzh [129]

Answer:

B: Present solution

4 0
4 years ago
An element has two naturally occurring isotopes, isotope 1 with an atomic weight of 78.918 amu and isotope 2 with an atomic weig
Sidana [21]

Answer:

The fraction of isotope 1 is 50.7 % and fraction  fraction of isotope 1 is 49.2 %.

Explanation:

Given that

Weight of isotope 1 = 78.918 amu

Weight of isotope 2 = 80.916 amu

Average atomic weight= 79.903 amu

Lets take fraction of isotope 1 is x then fraction of isotope 2 will be 1-x.

The total weight will be summation of these two isotopes

79.903 = 78.918 x + 80.916(1-x)

By solving above equation

80.916 - 79.903 = (80.916-78.918) x

   x=0.507

So the fraction of isotope 1 is 50.7 % and fraction  fraction of isotope 1 is 49.2 %.

4 0
4 years ago
Other questions:
  • An air standard cycle with constant specific heats is executed in a closed pistoncylinder system and is composed of the followin
    10·1 answer
  • Where is the Volkswagen super factory located? how is this locate relevant to us?​
    5·1 answer
  • Pascal's law tells us that a. force per unit area is constant within a closed container completely filled with a fluid if measur
    9·1 answer
  • Define the hydraulic diameter for a rectangular duct
    7·1 answer
  • Water at 15°C (rho = 999.1 kg/m^3) from a garden hose fills a 1.5-L container in 2.5 s. Assume that the volume flow rate, tempe
    14·1 answer
  • How does the turbo on a car work?
    5·2 answers
  • The only function of a flywheel is to cool the engine during operation. <br> True or False?
    5·2 answers
  • When storing used oil, it needs to be kept in ___________ containers. A) MetalB) PlasticC) UncoveredD) Leakproof
    12·1 answer
  • Do the coil resistances have any effect on the plots?
    10·1 answer
  • What car is this? I thinks its a nissan 240sx but i dont know
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!