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 saturated 1.5 ft3 clay sample has a natural water content of 25%, shrinkage limit (SL) of 12% and a specific gravity (GS) of 2
Svetllana [295]

79 f t^{3} is the volume of the sample when the water content is 10%.

<u>Explanation:</u>

Given Data:

V_{1}=100\ \mathrm{ft}^{3}

First has a natural water content of 25% = \frac{25}{100} = 0.25

Shrinkage limit, w_{1}=12 \%=\frac{12}{100}=0.12

G_{s}=2.70

We need to determine the volume of the sample when the water content is 10% (0.10). As we know,

V \propto[1+e]

\frac{V_{2}}{V_{1}}=\frac{1+e_{2}}{1+e_{1}}  ------> eq 1

e_{1}=\frac{w_{1} \times G_{s}}{S_{r}}

The above equation is at S_{r}=1,

e_{1}=w_{1} \times G_{s}

Applying the given values, we get

e_{1}=0.25 \times 2.70=0.675

Shrinkage limit is lowest water content

e_{2}=w_{2} \times G_{s}

Applying the given values, we get

e_{2}=0.12 \times 2.70=0.324

Applying the found values in eq 1, we get

\frac{V_{2}}{100}=\frac{1+0.324}{1+0.675}=\frac{1.324}{1.675}=0.7904

V_{2}=0.7904 \times 100=79\ \mathrm{ft}^{3}

7 0
3 years ago
Effects of adding more insulation to a cylinder increases heat transfer area. a)-True b)-False
Xelga [282]

Answer:

a)-True

Hope this helps even tho theres no school right now

3 0
3 years ago
There are three options for heating a particular house: a. Gas: $1.33/therm where 1 therm=105,500 kJ b. Electric Resistance: $0.
sergejj [24]

Answer:

Option ‘a’ is the cheapest for this house.

Explanation:

Cheapest method of heating must have least cost per kj of energy. So, convert all the energy in the same unit (say kj) and take select the cheapest method to heat the house.

Given:

Three methods are given to heat a particular house are as follows:

Method (a)

Through Gas, this gives energy of amount $1.33/therm.

Method (b)

Through electric resistance, this gives energy of amount $0.12/KWh.

Method (c)

Through oil, this gives energy of amount $2.30/gallon.

Calculation:

Step1

Change therm to kj in method ‘a’ as follows:

C_{1}=\frac{\$ 1.33}{therm}\times(\frac{1therm}{105500kj})

C_{1}=1.2606\times10^{-5} $/kj.

Step2

Change kWh to kj in method ‘b’ as follows:

C_{2}=\frac{\$ 0.12}{kWh}\times(\frac{1 kWh }{3600kj})

C_{2}=3.334\times10^{-5} $/kj.

Step3

Change kWh to kj in method ‘c’ as follows:

C_{3}=\frac{\$ 2.30}{gallon}\times(\frac{1 gallon }{138500kj})

C_{3}=1.66\times10^{-5} $/kj.

Thus, the method ‘a’ has least cost as compare to method b and c.

So, option ‘a’ is the cheapest for this house.

 

5 0
3 years ago
Any help is appreciated &lt;3
Len [333]

Answer:

forwarder

Explanation:

8 0
3 years ago
Which of the following statements about resistance is TRUE?
valentina_108 [34]

Answer:

I think it's the no 3rd

Explanation:

hope this helps

3 0
3 years ago
Other questions:
  • After informing his employer that he had cancer, Maury was abruptly fired. The federal legislation that prohibits discrimination
    6·1 answer
  • What is the air change rate (ACH) for a 100 ft^2 (9.3 m^2) space with a 10 ft (3.0 m) ceiling and an airflow rate of 200 cfm (95
    12·1 answer
  • Extra Credit: The Linc (parking lot and stadium)In celebration of the upcoming Super Bowl, for a maximum 10 points of extra cred
    7·1 answer
  • Argon is compressed in a polytropic process with n = 1.2 from 100 kPa and 30°C to 1200 kPa in a piston–cylinder device. Determin
    14·1 answer
  • A three-point bending test is performed on a glass specimen having a rectangular cross section of height 5.3 mm and width 11.6 m
    11·1 answer
  • What are the initial questions that a systems analyst must answer to build an initial prototype of the system output.
    14·1 answer
  • Match the terms with the correct definitions.
    14·1 answer
  • Explain your own understanding about the relevant connections between the four subsystems of Earth through the use of a creative
    9·1 answer
  • Hey answer quick for 20 points
    7·2 answers
  • which type of irrigation fluid is typically used for endoscopic procedures using monopolar electrosurgery
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!