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]
4 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]4 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
Data bars describe a graphic element that
Alexus [3.1K]
The correct option is C.
The data bar in Excel allows users to visualize values in a range of cells. Data bar is a conditional format that makes it easy to view and compare the values of a range of cells at the same time. A longer bar represent a larger value and a shorter bar represents a smaller value. 
5 0
3 years ago
Read 2 more answers
One purpose of fairy tales is to help children master the problems associated with growing up. Please select the best answer fro
-Dominant- [34]

Answer:

The answer is TRUE

Explanation:

7 0
3 years ago
Read 2 more answers
What do the power key and refresh key do when pressed together
9966 [12]

Answer:

shuts down the laptop.

Explanation:

i just did it and almost had a heart attack because it wouldn't turn on

3 0
3 years ago
A gui allows you to interact with objects on the screen such as icons and buttons true or false
Alja [10]

Answer:

True

Explanation:

7 0
3 years ago
How does one select an entrepreneurial activity?
dem82 [27]
<span>Entrepreneurial activity is a human action with the goal of the generation of value, through the creation or expansion of economic activity. Several things must be taken into consideration before starting an </span><span>entrepreneurial activity but the most important is :
- the benefits it will give (financial but also personal , will you be satisfied doing that activity and will the activity bring financial benefits to you?
If yes, then you can do this activity.
</span>
6 0
4 years ago
Other questions:
  • A _____________ is some text or data that is stored on your computer and used by a website to track how you use that site. quest
    8·2 answers
  • The acronym LAH stands for
    14·2 answers
  • Will a pair of bar magnet ,with keepers on the two ends, act as a magnet
    13·1 answer
  • Which of these is a Microsoft certification for system engineers?
    9·1 answer
  • What is the default view in a Word document?
    10·2 answers
  • Write a program to read a record from a binary file
    8·1 answer
  • The attacker sent data that was able to manipulate the return address that is reserved to store expected data
    5·1 answer
  • 1. Harold Worden, then 56-years-old, stole Kodak property
    9·1 answer
  • How to mark a discussion as read on canvas dashboard.
    10·1 answer
  • us refe rence: so 1 ac 2 2. describe the applications for merged documents in terms of the following benefits 2. describe the ap
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!