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
A spur gearset has a module of 6 mm and a velocity ratio of 4. The pinion has 16 teeth. Find the number of teeth on the driven g
levacccp [35]

Answer:

NG=64 teeth

dG=384mm

dP=96mm

C=240mm

Explanation:

step one:

given data

module m=6mm

velocity ratio VR=4

number of teeth of pinion Np=16

<u>Step two:</u>

<u>Required</u>

1. Number of teeth on the driven gear

N_G=N_P*V_R\\\\N_G=16*4\\\\N_G=64

<em>The driven gear has 64 teeth</em>

2.  The pitch diameters

The driven gear diameter

d_G=N_G*m\\\\d_G=64*6\\\\d_G=384

<em>The driven gear diameter is 384mm</em>

The pinion diameter

<em />d_P=N_P*m\\\\d_P=16*6\\\\d_P=96<em />

Pinion diameter is 96mm

3. Theoretical center-to-center distance

C=\frac{d_G+d_P}{2} \\\\C=\frac{384+96}{2} \\\\C=\frac{480}{2}\\\\C=240

The theoretical center-to-center distance is 240mm

5 0
3 years ago
Calculate the volume of a hydraulic accumulator capable of delivering 5 liters of oil between 180 and 80 bar, using as a preload
Vinil7 [7]

Answer:

1) V_o = 10 liters

2) V_o = 12.26 liters

Explanation:

For isothermal process n =1

V_o =\frac{\Delta V}{(\frac{p_o}{p_1})^{1/n} -(\frac{p_o}{p_2})^{1/n}}

V_o  = \frac{5}{[\frac{72}{80}]^{1/1} -[\frac{72}{180}]^{1/1}}

V_o = 10 liters

calculate pressure ratio to determine correction factor

\frac{p_2}{p_1} =\frac{180}{80} = 2.25

correction factor for calculate dpressure ration  for isothermal process is

c1 = 1.03

actual \ volume = c1\times 10 = 10.3 liters

b) for adiabatic process

n =1.4

volume of hydraulic accumulator is given as

V_o =\frac{\Delta V}{[\frac{p_o}{p_1}]^{1/n} -[\frac{p_o}{p_2}]^{1/n}}

V_o  = \frac{5}{[\frac{72}{80}]^{1/1.4} -[\frac{72}{180}]^{1/1.4}}

V_o = 12.26 liters

calculate pressure ratio to determine correction factor

\frac{p_2}{p_1} =\frac{180}{80} = 2.25

correction factor for calculate dpressure ration  for isothermal process is

c1 = 1.15

actual \volume = c1\times 10 = 11.5 liters

8 0
3 years ago
Write a new ARMv8 assembly file called "lab04b.S" which is called by your main function. It should have the following specificat
Len [333]

Answer:

my_mul:

.globl my_mul

my_mul:

   //Multiply X0 and X1

   //   Does not handle negative X1!

   //   Note : This is an in efficient way to multipy!

   SUB SP, SP, 16       //make room for X19 on the stack

   STUR X19, [SP, 0]    //push X19

   ADD X19, X1, XZR     //set X19 equal to X1

   ADD X9 , XZR , XZR //set X9 to 0

mult_loop:

   CBZ X19, mult_eol

   ADD X9, X9, X0

   SUB X19, X19, 1

   B mult_loop

mult_eol:

   LDUR X19, [SP, 0]

   ADD X0, X9, XZR      // Move X9 to X0 to return

   ADD SP, SP, 16       // reset the stack

   BR X30

Explanation:

6 0
4 years ago
Fixed objects that fix a location are called
Zielflug [23.3K]
Fix3d locationz i thinkz
4 0
3 years ago
Air flows through a device such that the stagnation pressure is 0.4 MPa, the stagnation temperature is 400°C, and the velocity i
RoseWind [281]

To solve this problem it is necessary to apply the concepts related to temperature stagnation and adiabatic pressure in a system.

The stagnation temperature can be defined as

T_0 = T+\frac{V^2}{2c_p}

Where

T = Static temperature

V = Velocity of Fluid

c_p = Specific Heat

Re-arrange to find the static temperature we have that

T = T_0 - \frac{V^2}{2c_p}

T = 673.15-(\frac{528}{2*1.005})(\frac{1}{1000})

T = 672.88K

Now the pressure of helium by using the Adiabatic pressure temperature is

P = P_0 (\frac{T}{T_0})^{k/(k-1)}

Where,

P_0= Stagnation pressure of the fluid

k = Specific heat ratio

Replacing we have that

P = 0.4 (\frac{672.88}{673.15})^{1.4/(1.4-1)}

P = 0.399Mpa

Therefore the static temperature of air at given conditions is 72.88K and the static pressure is 0.399Mpa

<em>Note: I took the exactly temperature of 400 ° C the equivalent of 673.15K. The approach given in the 600K statement could be inaccurate.</em>

3 0
3 years ago
Other questions:
  • Does a thicker core make an electromagnet stronger?
    13·1 answer
  • A gas in a piston–cylinder assembly undergoes a compression process for which the relation between pressure and volume is given
    10·1 answer
  • A horizontal curve is to be designed for a two-lane road in mountainous terrain. The following data are known: Intersection angl
    7·1 answer
  • A worker's hammer is accidentally dropped from the 20th floor of a building under construction. With what velocity does it strik
    5·1 answer
  • How do you remove a manual transmission?
    14·1 answer
  • . A fire hose with an inside diameter of 6.40 cm is connected to a water hydrant very close to the ground. The other end is atta
    8·1 answer
  • When is fall protection required in the construction industry
    13·1 answer
  • Do you think the plan for the bridge in South America is appropriate based on its location? Why or why not? Your answer should i
    6·2 answers
  • Hello it's my new id<br>I am numu ​
    15·1 answer
  • A 250-pound person would use a Type 1 ladder even if he were carrying a load with him. true or false
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!