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 common process for increasing the moisture content of air is to bubble it through a column of water. The air bubbles are assum
likoan [24]

Answer:

Explanation:

Assumptions is that

1. The flow is an unsteady one

2. Bubbles diameter is constant

3. The bubble velocity is slow

4. There is no homogenous reaction

5. It has a one dimensional flux model along the radial direction

5 0
3 years ago
The link acts as part of the elevator control for a small airplane. If the attached aluminum tube has an inner diameter of 25 mm
aksik [14]

Answer:

Tmax=14.5MPa

Tmin=10.3MPa

Explanation:

T = 600 * 0.15 = 90N.m

T_max =\frac{T_c}{j}  = \frac{x}{y}  = \frac{90 \times 0.0175}{\frac{\pi}{2} \times (0.0175^4-0.0125^4)}

=14.5MPa

T_{min} =\frac{T_c}{j}  = \frac{x}{y}  = \frac{90 \times 0.0125}{\frac{\pi}{2} \times (0.0175^4-0.0125^4)}

=10.3MPa

7 0
3 years ago
Which option distinguishes the step in the engineering design phase described in the following scenario?
rewona [7]

Answer:

reasearching the problem

Explanation:

EDG

7 0
3 years ago
Use phasor techniques to determine the impedance seen by the source given that R = 4 Ω, C = 12 μF, L = 6 mH and ω = 2000 rad/sec
Zielflug [23.3K]

Answer:

Z = 29.938Ω ∠22.04°

I = 2.494A

Explanation:

Impedance Z is defined as the total opposition to the flow of current in an AC circuit. In an R-L-C AC circuit, Impedance is expressed as shown:

Z² = R²+(Xl-Xc)²

Z = √R²+(Xl-Xc)²

R is the resistance = 4Ω

Xl is the inductive reactance = ωL

Xc is the capacitive reactance =

1/ωc

Given C = 12 μF, L = 6 mH and ω = 2000 rad/sec

Xl = 2000×6×10^-3

Xl = 12Ω

Xc = 1/2000×12×10^-6

Xc = 1/24000×10^-6

Xc = 1/0.024

Xc = 41.67Ω

Z = √4²+(12-41.67)²

Z = √16+880.31

Z = √896.31

Z = 29.938Ω (to 3dp)

θ = tan^-1(Xl-Xc)/R

θ = tan^-1(12-41.67)/12

θ = tan^-1(-29.67)/12

θ = tan^-1 -2.47

θ = -67.96°

θ = 90-67.96

θ = 22.04° (to 2dp)

To determine the current, we will use the relationship

V = IZ

I =V/Z

Given V = 12V

I = 29.93/12

I = 2.494A (3dp)

7 0
3 years ago
Assume you are programming an embedded microcontroller in C and want your code to follow good software engineering practices, be
insens350 [35]

Answer:

unsigned char

Explanation:

The different data types with their sizes and range are given as follows,

  • char - 1 byte - Value: -128 - 127
  • unsigned char- 1 byte - Value: 0 - 255

All other data types including integers, float, double require 2 bytes or more. Therefore, the data type with the smallest size that can hold values from 0 to 132 is unsigned char.

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which solution causes cells to shrink
    13·1 answer
  • Five kg of water is contained in a piston-cylinder assembly, initially at 5 bar and 240°C. The water is slowly heated at constan
    5·1 answer
  • when a metal, such as lead, is oxidied (loses electrons) to form a positive ion (cation), how does he solubility change?
    14·1 answer
  • The following sentence can be categorized as what stage in the Scientific Method: Abraham notices that Saharan desert ants will
    6·1 answer
  • In the given circuit, V(t)=12cos(2000t+45)V, R1=R2=2Ω, L1=L2=L3=3mH and C1=250μF. You are required to find the Thevenin equivale
    7·1 answer
  • A low-resistance path in a circuit, commonly called a _____ can cause a circuit breaker to trip
    7·1 answer
  • Which of the following characteristics would not give animals an advantage in the ocean?
    13·1 answer
  • Use the map to answer the question.
    12·1 answer
  • I love touching the atmospheres crest
    8·1 answer
  • What are the disadvantages of military shovels?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!