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
The first widely adopted windows product, ____, featured a standardized look and feel, similar to the one made popular by apple'
slega [8]
<span>The first widely adopted windows product, Windows 3, featured a standardized look and feel, similar to the one made popular by Apple's Macintosh computer .
</span>
Microsoft’s Windows operating system was first introduced in 1985, Windows 3 which was released in 1990 was the first version to see more widespread success, because it had the ability to run MS-DOS programmes in windows which brought multitasking in programming.


8 0
3 years ago
Please help me excel questions!​
Elenna [48]

Answer:

hi,hi,hi,hi,hi,hi,hi,hi,hi,hi,hi,hi,hi

7 0
3 years ago
Read 2 more answers
A plan to budget time for studying and activities is referred to as
krok68 [10]

Answer:

a study schedule.

Explanation:

A plan to budget time for studying and activities is referred to as a study schedule. A study schedule is mostly designed by a student and it comprises of their learning goals and objectives, as well as allocated time to start and  complete.

The main purpose of a study schedule is to avail students the opportunity to maximize their time and improve their ability to study by themselves through an organized schedule for specific subjects, courses or class.

3 0
3 years ago
As a final lesson to her team, Katie shows them a job that has already been preflighted and is now getting ready to be sent to t
Vsevolod [243]

Answer:

Printed

Explanation:

The job was finished and sent to the printer. In the printer, you have to waite to be printed

5 0
3 years ago
A computer reads a sequence from top to bottom and left to right? True or False
Nat2105 [25]
The answer is False
5 0
3 years ago
Other questions:
  • Why is the answer A?
    6·1 answer
  • In cell R9, enter a formula using the AVERAGEIF function to determine the average number of years of experience for lifeguards.
    12·1 answer
  • If your BAL is .10 you can expect a _______ drop in complex performance compared to the sober level
    6·1 answer
  • What is the first thing you should do when troubleshooting a computer problem
    5·2 answers
  • Which option nukes your systemâall apps, programs, user files, user settingsâand presents a fresh installation of Windows?
    13·1 answer
  • What two pieces of information would you need in order to measure the masses of stars in an eclipsing binary system?
    9·1 answer
  • What do we call data that's broken down into bits and sent through a network?
    15·1 answer
  • You are configuring NIC teaming on a server with two network adapters. You chose Switch Independent Mode. You now must choose be
    15·1 answer
  • QUESTION 5
    9·1 answer
  • Which of the following is Microsoft Windows 10 virtualization technology?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!