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 tank with a volume of 8 m3 containing 4 m3 of 20% (by volume) NaOH solution is to be purged by adding pure water at a rate of
lawyer [7]

Answer:

The time necessary to purge 95% of the NaOH is 0.38 h

Explanation:

Given:

vfpure water(i) = 3 m³/h

vNaOH = 4 m³

xNaOH = 0.2

vfpure water(f) = 2 m³/h

pwater = 1000 kg/m³

pNaOH = 1220 kg/m³

The mass flow rate of the water is = 3 * 1000 = 3000 kg/h

The mass of NaOH in the solution is = 0.2 * 4 * 1220 = 976 kg

When the 95% of the NaOH is purged, thus the NaOH in outlet is = 0.95 * 976 = 927.2 kg

The volume of NaOH in outlet after time is = 927.2/1220 = 0.76 m³

The time required to purge the 95% of the NaOH is = 0.76/2 = 0.38 h

4 0
3 years ago
Convert mechanical energy into electric energy. What can he use?
Nina [5.8K]

Answer:

<h2>Generator </h2>

Explanation:

A generator converts mechanical energy into electrical energy

7 0
3 years ago
The waffle slab is: a) the two-way concrete joist framing system. b) a one-way floor and roof framing system. c) the one-way con
GREYUIT [131]

Answer:

a) the two-way concrete joist framing system

Explanation:

A waffle slab is also known as ribbed slab, it is a slab which as waffle like appearance with holes beneath. It is adopted in construction projects that has long length, length more than 12m. The waffle slab is rigid, therefore it is used in building that needs minimal vibration.

4 0
3 years ago
Give me an A please!!!¡!!!!¡
Andrei [34K]

Answer:

I am in 6th grade why am i in high school things.

Explanation:

8 0
3 years ago
A tension test is carried out on an Al alloy specimen which has an original diameter of 0.505 in and an original gauge length of
Contact [7]

Answer:

Detailed solution is given in attached image

5 0
3 years ago
Other questions:
  • A curve with 0.3 m constant radius contains a bead that is moving on it such that its rotational velocity is 3t2 sec-1. If the b
    12·1 answer
  • Memory Question!
    7·1 answer
  • Is someone an engineer that can help me?plz
    11·1 answer
  • Calculate the equivalent capacitance of the three series capacitors in Figure 12-1 A) 0.060 uF B) 0.8 uF C) 0.58 uF D) 0.01 uF
    12·1 answer
  • Print reading for industry unit 9 review questions
    6·2 answers
  • One kilogram of air, initially at 5 bar, 350 K, and 3 kg of carbon dioxide (CO2), initially at 2 bar, 450 K, are confined to opp
    14·1 answer
  • Which one of the following activities is not exempt from licensure pursuant to Chapter 471, F.S.? A person practicing engineerin
    5·1 answer
  • Helium gas expands in a piston-cylinder in a polytropic process with n=1.67. Is the work positive, negative or zero?
    8·1 answer
  • Tony works as a Sorter in a processing factory. Which qualifications does he most likely have?
    10·2 answers
  • What building codes did Mega Corporation fail to follow?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!