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
vodka [1.7K]
3 years ago
5

python Given num_rows and num_cols, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E.

Print a space after each seat, including after the last. Ex: num_rows = 2 and num_cols = 3 prints: 1A 1B 1C 2A 2B 2Cnum_rows = 2num_cols = 3# Note 1: You will need to declare more variables# Note 2: Place end=' ' at the end of your print statement to separate seats by spaces

Engineering
1 answer:
MissTica3 years ago
3 0

Explanation:

First of all get the input from the user, number of rows and number of columns where rows represents seat digit number and column represents the seat letter

rows is initialized to 1 to ensure that row starts at 1 or you can remove it then seat number will start from 0.

The first loop is used for digits starting from 1 to number of rows

The second loop is used for letters starting from 1 to number of columns

since rows and cols are not of the same type that's why we are converting the int type to string type

print(str(rows)+cols) counter will keep updating the columns A, B, C.....

rows= rows + 1 counter will keep updating the rows 1, 2, 3....

Code:

Please refer to the attached image.

Output:

Please enter the number of rows: 2

Please enter the number of columns: 3

1A

1B

1C

2A

2B

2C

You might be interested in
What impact does modulus elasticity have on the structural behavior of a mechanical design?
devlian [24]

Answer with Explanation:

The modulus of elasticity has an profound effect on the mechanical design of any machine part as explained below:

1) Effect on the stiffness of the member: The ability of any member of a machine to resist any force depends on the stiffness of the member. For a member with large modulus of elasticity the stiffness is more and hence in cases when the member has to resist a direct load the member with more modulus of elasticity resists the force better.

2)Effect on the deflection of the member: The deflection caused by a force in a member is inversely proportional to the modulus of elasticity of the member thus in machine parts in which we need to resist the deflections caused by the load we can use materials with greater modulus of elasticity.

3) Effect to resistance of shear and torque: Modulus of rigidity of a material is found to be larger if the modulus of elasticity of the material is more hence for a material with larger modulus of elasticity  the resistance it offer's to shear forces and the torques is more.

While designing a machine element since the above factors are important to consider thus we conclude that modulus of elasticity has a profound impact on machine design.

8 0
3 years ago
What is the braks mean effictive pressure?
OverLord2011 [107]

Engine cylinder pressure

<u>Explanation:</u>

  1. Brake mean effective pressure is a method to calculate  the engine cylinder pressure which  would give the measured brake horsepower. Brake mean effective pressure is used to identify engine efficiency regardless of capacity or engine speed.
  2. It is used to identify engine efficiency.It is measured by means of transducers or pressure gauges.
  3. It is the measure of engine capacity to do work.

7 0
3 years ago
Hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
BartSMP [9]

Answer:

3. -9 degrees farenheit 5. Shes missing 3 cents. 6. 641 feet below sea level

Explanation:

3 0
3 years ago
Read 2 more answers
How do we find percentage error in measuring voltage across a resistor​
Black_prince [1.1K]

Answer:

  use the percentage error relation

Explanation:

The percentage error in anything is computed from ...

  %error = ((measured value)/(accurate value) -1) × 100%

__

The difficulty with voltage measurements is that the "accurate value" may be hard to determine. It can be computed from the nominal values of circuit components, but there is no guarantee that the components actually have those values.

Likewise, the measuring device may have errors. It may or may not be calibrated against some standard, but even measurement standards have some range of possible error.

6 0
3 years ago
Read 2 more answers
A westbound section of freeway currently has three 12-ft wide lanes, a 6-ft right shoulder, and no ramps within 3 miles upstream
Tresset [83]

Answer:

•Estimated density = 39.685Pc/mi/en

•Level of service, LOS frequency = LOSC

Explanation:

We are given:

•Freeway current lane width,B = 12ft

• freeway current shoulder width,b = 6ft

• percentage of heavy vehicle, Ptb = 10℅

• peak hour factor, PHF = 0.9

Let's consider,

•Number of lanes N = 4

• flow of traffic V = 7500vph

• percentage of Rv = 0, therefore the freeflow speed in freeway FFS = 70mph

• cars equivalent for recreational purpose Er= 2

•cars to be used for trucks and busses Etb= 2.5

Let's first calculate for the heavy adjustment factor.

We have:

F_H_v = \frac{1}{1+P_t_b(E_t_b-1)+Pr(Er-1)}

Substituting figures in the equation we have:

= \frac{1}{1+0.1(2.5-1)+0(2-1)}

= 0.75

Let's now calculate equivalent flow rate of the car using:

Vp = \frac{V}{(P_H_F)*N)*(F_H_v)*(F_p)}

= \frac{7500}{0.9*4*0.75*1}

= 2777.7 pc/h/en

Calculating for traffic density, we have:

D = \frac{Vp}{FFS}

D = \frac{2777.7}{70}

D = 39.685 Pc/mi/en

Using the table for LOS criteria of basic frequency segment, the level of service LOS of frequency is LOSC

4 0
3 years ago
Other questions:
  • A rod is 2m long at temperature of 10oC. Find the expansion of the rod, when the temperature is raised to 80oC. If this expansio
    7·1 answer
  • You want to determine whether the race of the defendant has an impact on jury verdicts. You assign participants to watch a trial
    9·1 answer
  • Set up the following characteristic equations in the form suited to Evanss root-locus method. Give L(s), a(s), and b(s) and the
    8·1 answer
  • If a machine uses LESS effort to overcome a given resistance force (if Fe is less than FR), it has an actual mechanical advantag
    13·1 answer
  • If the bolt head and the supporting bracket are made of the same material having a failure shear stress of 'Tra;i = 120 MPa, det
    9·1 answer
  • A block of mass 0.75 kg is suspended from a spring having a stiffness of 150 N/m. The block is displaced downwards from its equi
    5·2 answers
  • Which of the following sentences uses the word malleable correctly?
    7·2 answers
  • What are the major types of stone used in construction? How do their properties differ? What sequence of operations would be use
    10·1 answer
  • A pulse-jet baghouse is desired for a finished cement plant. Calculate the number of bags required to filter 500 m3/min of air w
    7·1 answer
  • Q.14
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!