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]
2 years ago
7

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

Engineering
1 answer:
BabaBlast [244]2 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
Which statement about tensile stress is true? A. Forces that act perpendicular to the surface and pull an object apart exert a t
svp [43]

Answer:

A. Forces that act perpendicular to the surface and pull an object apart exert a tensile stress on the object.

Explanation:

Tensile stress is referred as a deforming force, in which force acts perpendicular to the surface and pull an object apart, attempting to elongate it.

The tensile stress is a type of normal stress, in which a perpendicular force creates the stress to an object’s surface.

Hence, the correct option is "A."

3 0
3 years ago
A small pad subjected to a shearing force is deformed at the top of the pad 0.08 in. The height of the pad is 1.38 in. What is t
Aleksandr-060686 [28]

Answer:

The shear strain is 0.05797 rad.

Explanation:

Shear strain is the ratio of change in dimension along the shearing load direction to the height of the plate under application of shear load. Width of the plate remains same. Length of the plate slides under shear load.

Step1

Given:

Height of the pad is 1.38 in.

Deformation at the top of the pad is 0.08 in.

Calculation:

Step2

Shear strain is calculated as follows:

tan\phi=\frac{\bigtriangleup l}{h}

tan\phi=\frac{0.08}{1.38}

tan\phi= 0.05797

For small angle of \phi, tan\phi can take as\phi.

\phi = 0.05797 rad.

Thus, the shear strain is 0.05797 rad.

7 0
3 years ago
Say you have a random, unordered list containing 4096 four-digit numbers. Describe the most efficient way to: sort the list and
Debora [2.8K]

Answer:

Answer explained below

Explanation:

It is given that numbers are four-digit so maximum value of a number in this list could be 9999.

So we need to sort a list of integers, where each integer lies between [0,9999].

For these given constraints we can use counting sort which will run in linear time i.e. O(n).

--------------------------------------------------------------------------------

Psuedo Code:

countSort(int numList[]) {

int count[10000];

count[i] = 0; for all i;

for(int num in numList){

count[num]+= 1;

}

return count;

}

--------------------------------------------------------------------------------

Searching in this count array will be just O(1).

E.g. Lets say we want to search if 3 was present in the original list.

Case 1: it was present in the original list:

Then the count[3] would have been incremented by our sorting algorithm. so in case element exists then count value of that element will be greater than 0.

Case 2: it was not present:

In this case count[3] will remain at 0. so in case element does not exist then count of that element will be 0.

So to search for an element, say x, we just need to check if count[x]>0.

So search is O(1).

Run times:

Sorting: O(n)

Search: O(1)

6 0
3 years ago
What is the resultant force on one side of a 25cm diameter circular plate standing at the bottom of 3m of pool water?
Tom [10]

Answer:

F=1.47 KN

Explanation:

Given that

Diameter of plate = 25 cm

Height of pool h = 3 m

We know that force can be given as

F= P x A

P=ρ x g x h

Now by putting the values

P=1000 x 10 x 3

P= 30 KPa

A=\dfrac{\pi}{4}\times 0.25^2\ m^2

A=0.049\ m^2

F= 30 x 0.049 KN

F=1.47 KN

So the force on the plate will be 1.47 KN.

4 0
3 years ago
To solve the problem, make assumptions for missing data and justify. Given:
finlep [7]

Answer:

5,4,1, this is a explication

6 0
2 years ago
Other questions:
  • 1.The moist unit weights and degrees of saturation of a soil are given: moist unit weight (1) = 16.62 kN/m^3, degree of saturati
    11·1 answer
  • Air at atmospheric pressure and at 300K flows with a velocity of 1.5m/s over a flat plate. The transition from laminar to turbul
    13·1 answer
  • Steam in a heating system flows through tubes whose outer diameter is 5 cm and whose walls are maintained at a temperature of 19
    13·1 answer
  • Describing Tasks for Stationary Engineers Click this link to view O*NET’s Tasks section for Stationary Engineers. Note that comm
    12·2 answers
  • Name the famous engineer in the world​
    10·2 answers
  • Nêu đặc điểm của tín hiệu PAM rời rạc dạng lưỡng cực NRZ, RZ
    11·1 answer
  • Respond with TRUE if the symbol of the valve shown below is
    10·1 answer
  • If the load parameters are: Vln=600kV, Il=100A (resistive), calculate the source voltage and current when the line is 50Miles (s
    14·1 answer
  • What is the difference between a natural and artificial diamond ​
    6·2 answers
  • A 35 ft long solid steel rod is subjected to a load of 8,000 lb. This load causes the rod to stretch 0.266 in. The modulus of el
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!