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
PLEASE HELP!!! Me turn this into a video & add liana flores- raise the moon (instrumental) in the background for the music.
Marina CMI [18]

Answer:

Try going to your settings and allow output camera

Explanation:

5 0
2 years ago
Read 2 more answers
1 : What format would you apply to give an entry the appearance of 12-Mar-2014
Arturiano [62]

Answer:

1. Date 2. It will appear to the right of the selected column.

4 0
3 years ago
What has abstraction enabled users to do?
Sindrei [870]

Answer:

c, understand what a computer does

8 0
2 years ago
Read 2 more answers
Item = "quesadilla"
jok3333 [9.3K]

Answer:

item = "quesadilla"

meat = "steak"

queso = False

guacamole = False

double_meat = False

base_price = 4.5

if item == "quesadilla":

base_price = 4.0

elif item == "burrito":

base_price = 5.0

if meat == "steak" or meat == "pork":

base_price += 0.50

if meat == "steak" and double_meat:

base_price += 1.50

elif meat == "pork" and double_meat:

base_price += 1.50

elif double_meat:

base_price += 1.0

if guacamole:

base_price += 1.0

if queso and item != "nachos":

base_price += 1.0

print(base_price)

Explanation:

  • Use a conditional statement to check if meat is steak or pork then add 0.50 to base_price .
  • Check if the meat is steak or pork, then double_meat adds 1.50 or 1.0 otherwise .
  • Check if meat is steak and its double_meat , then add 1.50  and if its for guacamole, then add 1.00 to base_price . If queso is there and item is not nachos, add 1.00 to base_price .
  • Finally when item is nachos, no need to add any money to base_price .

7 0
3 years ago
what does it mean when my brainly just tells me theres no answers for any of my questions i have the plus and ive been using it
VashaNatasha [74]
Well it might be a glitch or it didn’t save.
3 0
3 years ago
Other questions:
  • List and the deference between MS access objects​
    8·1 answer
  • Which type of system would be more reliable for keeping a plane traveling at constant speed – an automatically controlled feedba
    11·1 answer
  • Can I have help on this
    7·2 answers
  • In these weeks readings, we learned about the CIA Triad and how each exhibits dependence on the other. Give examples of how fail
    12·1 answer
  • you turn on your desktop computer. You can hear the fans start up, but the monitor remains blank. You wait a while, but it doesn
    14·1 answer
  • Rule- based systems are subset of expert systems true or false?
    7·1 answer
  • Which shot is not the best for a widescreen image
    11·2 answers
  • Explain to Alana why she might not want to blast her boss on social media just yet.<br>​
    6·1 answer
  • What are the cloud storage components
    6·1 answer
  • State the functions of the parts of the computer​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!