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 500-km, 500-kV, 60-Hz, uncompensated three-phase line has a positivesequence series impedance. z = 5 0.03 1 + j 0.35 V/km and
Anni [7]

Answer:

A) 282.34 - j 12.08 Ω

B) 0.0266 + j 0.621 / unit

C)

A = 0.812 < 1.09° per unit

B =  164.6 < 85.42°Ω  

C =  2.061 * 10^-3 < 90.32° s

D =  0.812 < 1.09° per unit

Explanation:

Given data :

Z ( impedance ) = 0.03 i  + j 0.35 Ω/km

positive sequence shunt admittance ( Y ) = j4.4*10^-6 S/km

A) calculate Zc

Zc = \sqrt{\frac{z}{y} }  =  \sqrt{\frac{0.03 i  + j 0.35}{j4.4*10^-6 } }    

    = \sqrt{79837.128< 4.899^o}   =  282.6 < -2.45°

hence Zc = 282.34 - j 12.08 Ω

B) Calculate  gl

gl = \sqrt{zy} * d  

 d = 500

 z = 0.03 i  + j 0.35

 y = j4.4*10^-6 S/km

gl =  \sqrt{0.03 i  + j 0.35*  j4.4*10^-6}  * 500

   = \sqrt{1.5456*10^{-6} < 175.1^0} * 500

   = 0.622 < 87.55 °

gl = 0.0266 + j 0.621 / unit

C) exact ABCD parameters for this line

A = cos h (gl) . per unit  =  0.812 < 1.09° per unit ( as calculated )

B = Zc sin h (gl) Ω  = 164.6 < 85.42°Ω  ( as calculated )

C = 1/Zc  sin h (gl) s  =  2.061 * 10^-3 < 90.32° s ( as calculated )

D = cos h (gl) . per unit = 0.812 < 1.09° per unit ( as calculated )

where :  cos h (gl)  = \frac{e^{gl} + e^{-gl}  }{2}

             sin h (gl) = \frac{e^{gl}-e^{-gl}  }{2}

     

7 0
3 years ago
Infinitivo de vivia kkk xd
blagie [28]

Answer:

pls put a question not random letters

Explanation:

8 0
3 years ago
Ughhh I feel so moody rn and I’m cramping so bad
padilas [110]
Explanation:!!

I hope you Feel better :)
3 0
3 years ago
Read 2 more answers
A standard penetration test has been conducted on a coarse sand at a depth of 16 ft below the ground surface. The blow counts ob
scoray [572]

Solution :

Given :

The number of blows is given as :

0 - 6 inch = 4 blows

6 - 12 inch = 6 blows

12 - 18 inch = 6 blows

The vertical effective stress $=1500 \ lb/ft^2$

                                              $= 71.82 \ kN/m^2$

                                             $ \sim 72 \ kN/m^2 $

Now,

$N_1=N_0 \left(\frac{350}{\bar{\sigma}+70} \right)$

$N_1 = $ corrected N - value of overburden

$\bar{\sigma}=$ effective stress at level of test

0 - 6 inch, $N_1=4 \left(\frac{350}{72+70} \right)$

                      = 9.86

6 - 12 inch, $N_1=6 \left(\frac{350}{72+70} \right) $

                        = 14.8

12 - 18 inch, $N_1=6 \left(\frac{350}{72+70} \right) $

                         = 14.8

$N_{avg}=\frac{9.86+14.8+14.8}{3}$

       = 13.14

       = 13

8 0
3 years ago
The purpose of pasteurizing milk is to
katen-ka-za [31]

Answer:

i think it c

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • Two kg of N2 at 450 K, 7 bar is contained in a rigid tank connected by a valve to another rigid tank holding 1 kg of O2 at 300 K
    13·1 answer
  • The uniform dresser has a weight of 90 lb and rests on a tile floor for which the coefficient of static friction is 0.25. If the
    6·1 answer
  • How would an engineer know if a product design were feasible?
    8·2 answers
  • 1- A square-wave inverter has a dc source of 96 V and an output frequency of 60 Hz. The load is a series RL load with R = 5 Ohm
    7·1 answer
  • The temperature of a gas stream is to be measured by a thermocouple whose junction can be approximated as a 1.2-mm-diameter sphe
    7·1 answer
  • Convert 25 mm into in.
    13·1 answer
  • Which option identifies the step of the implementation phase represented in the following scenario?
    9·2 answers
  • Refrigerant-134a enters the expansion valve of a refrigeration system at 120 psia as a saturated liquid and leaves at 20 psia. D
    15·1 answer
  • Which option identifies the concept represented in the following scenario?
    7·1 answer
  • There are some sections of the SDS that are not mandatory.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!