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
Which of the following best describes the purpose of child labor laws?
BabaBlast [244]

Answer:

Are there supposed to be answer choices with this question?

Child labor laws are basically laws placing restrictions and regulations on the work of minors.

6 0
3 years ago
Read 2 more answers
Add me on fornite buddies Lynn_.25
Anna007 [38]

i- why would u ask that

Explanation:

6 0
2 years ago
Read 2 more answers
You often insert your company's logo into a document you create.one way to make it easier for you to quickly insert it is to sav
eduard
Save the logo as a TEMPLATE.

A template is a pre-developed page layout in soft copy or hard copy used to make pages with the same pattern, style, or design.

In the above scenario, you can prepare a template with you logo in it and save it for future use. In the event that you need to create a new document, you only have to bring up the saved template and edit it with the new information that you need to type.

This way, you will not be hassled to manually add your logo to every new document you create.
5 0
3 years ago
Problem 1 Calculating the tip when you go to a restaurant is not difficult, but your restaurant wants to suggest a tip according
DIA [1.3K]

Answer:

bill = float(input("Enter the bill amount: "))

rating = int(input("Choose a rating: 1 = Totally satisfied, 2 = Satisfied, 3 = Dissatisfied.: "))

if rating is 1:

   tip = bill * 0.2

elif rating is 2:

   tip = bill * 0.15

elif rating is 3:

   tip = bill * 0.1

print("The rating is: " + str(rating))

print("The tip is: $%.2f" % (tip))

Explanation:

*The code is in Python

- Ask the user for the <em>bill</em> and <em>rating</em>

- Depending on the <em>rating</em>, calculate the <em>tip</em> using <u>if else</u> statement i.e. If the rating is chosen as 1, calculate the tip by taking 20 percent of the bill.

- Print the <em>rating</em> and the <em>tip</em>

4 0
3 years ago
How do you keep word from trying to capitalize every isolated letter "i"
Firdavs [7]
Write "i" the write random words then delete it and add the lowercase i
8 0
2 years ago
Read 2 more answers
Other questions:
  • Ron is creating building blocks in Word. How can he make the building blocks that he created available?
    11·2 answers
  • An operating system cannot run from an external drive. true or false
    15·1 answer
  • Which items may interfere with a wireless connection and may cause disruptions or delays in submitting assignments in blackboard
    9·2 answers
  • When discussing the data-modeling building blocks, anything (a person, a place, a thing, or an event) about which data are to be
    15·1 answer
  • Consider an unpipelined or single-stage processor design like the one discussed in slide 6 of lecture 17. At the start of a cycl
    10·1 answer
  • True or False? At any point in time, an open file has a current file pointer indicating the place where the next read or write o
    15·1 answer
  • Irene wants to connect your smart phone wirelessly to her laptop in order to transfer images. which two images could she reasona
    15·1 answer
  • 5. A Disk defragmenter tool does what to a computer HDD?
    6·1 answer
  • Modern Computers compared to earlier computers are
    10·1 answer
  • Write a function called changeCharacter that takes three parameters – a character array, its size, and the replacement character
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!