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
krok68 [10]
3 years ago
8

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.
Sample output with inputs: 2 3

1A 1B 1C 2A 2B 2C
Computers and Technology
1 answer:
nata0808 [166]3 years ago
4 0

Answer:

Following are the program for the above question in python:

Explanation:

def seat(num_rows,num_cols):#function definition.

   for x in range(1,num_rows+1):#first for loop.

       c='A'

       for y in range(1,num_cols+1): #second for loop.

           print(str(x)+c,end=" ") #print the value

           c=chr(ord(c)+1) #expression to form a charater addition.

seat(int(input("enter the number of rows: ")),int(input("enter the number of columns: "))) #take the input from the user.

Output:

  • If the user inputs 2 and 3, then the output is :"1A 1B 1C 2A 2B 2C 3A 3B 3C 4A 4B 4C".

Code Explanation :

  • The above code is in python language, in which the first line is used to render a message to the user then take the inputs from the user and then pass to the function after converting into int function.
  • Then there are two loops in the function which are used to print the number of the seat.
  • The first loop is used to print the row number and the second loop is used to print the column number.
You might be interested in
10. This famous designer’s sister took over his clothing line after his assassination in 1997.
rewona [7]

Please find the answers in attached file.

Download docx
8 0
2 years ago
Which fund classification would a focus on only stocks of technology companies match?
Bumek [7]

Answer:

Growth funds

Explanation:

This funds fucos on capital appreciation

5 0
3 years ago
Talon is a new game designer working on an exciting and innovative game idea, but its time to examine the idea for technical fea
GarryVolchara [31]

Answer:

I think the answer is C.

Explanation:

4 0
2 years ago
Read 2 more answers
What is the name of this tool and what can it be used for?<br> Thanks!!
Iteru [2.4K]
That is a corqet tool it is used for fixing tires
6 0
3 years ago
If it malfunctions and I can throw it, then it's a hardware problem; if I have to yell at it because there is nothing to pick up
kobusy [5.1K]
Software problem.
Assuming "Software" is one of the available answers.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Look at the slide. How could the slide best be improved? By reducing the number of visual aids by increasing the font size by da
    8·2 answers
  • Double clicking a word selects the entire word?
    9·2 answers
  • What's one way to engage teens in technology?
    8·1 answer
  • Give an example of an app, website, or a game that used addictive design. Describe three features of addictive design it uses.
    11·2 answers
  • Create a calendar named fitness and then display it in a calendar view with the default calendar.
    15·1 answer
  • True or False <br><br> Rootkits are only made by black-hat hackers.
    8·1 answer
  • Suppose a byte-addressable computer using set-associative cache has 2 16 bytes of main memory and a cache size of 32 blocks and
    10·1 answer
  • Which branch of science helps avoid or minimize stress-related injuries at workplace?
    14·1 answer
  • Rewrite the Espresso Counter program to Swap or interchange any two rows of the output. Copy and paste just the interchanged par
    14·1 answer
  • A packet switch has 5 users, each offering packets at a rate of 10 packets per second. The average length of the packets is 1,02
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!