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
g100num [7]
3 years ago
7

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, including after the last. Ex: num_rows = 2 and num_cols = 3 prints: 1A 1B 1C 2A 2B 2C
num_rows = 2
num_cols = 3
# Note 1: You will need to declare more variables
# Note 2: Place end=' ' at the end of your print statement to separate seats by spaces

Computers and Technology
1 answer:
soldi70 [24.7K]3 years ago
4 0

Answer:

The program written in Python is as follows

Explanation:

You might be interested in
Give an O(log m + log n)-time algorithm that takes two sorted lists of sizes m and n, respectively, as input and returns the ith
olga2289 [7]

Binary search is used similarly. K'th element is found in more productive way.

<u>Explanation:</u>

arr1 and arr2 are the middle elements which are compared, let us compute as mid1 and mid2. Let us predict arr1 [mid1] k, the elements are not needed after mid2 elements.  arr2 are set as last element for arr2 [mid2].  New sub problems are defined. When one array is half the size.

C++ code for the algorithm.

#include <iostream>

using namespace std;    

int kth(int *arr1, int *arr2, int *end1, int *end2, int k)

{

if (arr1 == end1)

return arr2[k];

if (arr2 == end2)

return arr1[k];

int mid1 = (end1 - arr1) / 2;

int mid2 = (end2 - arr2) / 2;

if (mid1 + mid2 < k)

{

if (arr1[mid1] > arr2[mid2])

return kth(arr1, arr2 + mid2 + 1, end1, end2,

k - mid2 - 1);

else

return kth(arr1 + mid1 + 1, arr2, end1, end2,

k - mid1 - 1);

}

else

{

if (arr1[mid1] > arr2[mid2])

return kth(arr1, arr2, arr1 + mid1, end2, k);

else

return kth(arr1, arr2, end1, arr2 + mid2, k);

}    

int main()

{

int arr1[5] = {2, 3, 6, 7, 9};

int arr2[4] = {1, 4, 8, 10};    

int k = 5;

cout << kth(arr1, arr2, arr1 + 5, arr2 + 4, k - 1);

return 0;

}

7 0
3 years ago
What does a wholesaler do?
Svetach [21]
Wholesalers acquire goods from manufacturers, farmers or miners, holds them then distributes them to retailers.
6 0
3 years ago
Which of the following is true of the poka-yoke approach used for mistake-proofing processes?
Svetradugi [14.3K]

Answer:  b)It helps to engage workers in continuous improvement activities.

Explanation: Poke-yoke method was the technique to eliminate the mistakes that happen in a manufacturing process. It helps in avoiding the issues in the product and correcting those errors.

Mistake proofing is the mechanism of this methods that ensures about the product manufactured is safe from any failure and defects.It alerts the workers to improve the product through their working.

Other options are incorrect because it was developed by Shigeo Shingo , they had easy mechanism and feedback system did not told the workers about defects.Thus, the correct option is option(b).

7 0
3 years ago
Read 2 more answers
Snap Me on <br>samxavier.18​
Ahat [919]

Answer:no thank you ima goody

Explanation:

7 0
3 years ago
Read 2 more answers
The following code processes a file containing five positive numbers. What will the variable $result contain after the code is e
Tanzania [10]

Answer:

highest of five numbers in the file

Explanation:

  • This code reads the file "some-file.txt" and saves the result in variable "somefile"
  • The runs a for loop for a count of 5.
  • In each loop it compares the current value of the file with the value of the variable result and if the result is true it updates the value of the variable result.
  • At the end of this code the variable result will contain the highest value in the file "some-file.txt" and print it.

3 0
3 years ago
Other questions:
  • All users on the network have antivirus software; however, several users report that they have what an administrator described a
    10·1 answer
  • A number of LC-3 instructions have an "evaluate address" step in the instruction cycle, in which a 16-bit address is constructed
    6·1 answer
  • Having just one error on a cover letter may eliminate an applicant from being considered for employment?
    13·1 answer
  • In C, how could I use a command line input to remove certain characters from an existing string? For example, if I have string '
    8·1 answer
  • Create a class named Lease with fields that hold an apartment tenant’s name, apartment number, monthly rent amount, and term of
    13·1 answer
  • Digital on a smart phone means the camera is actually zooming in on the photo itself not the subject that you are shooting true
    8·1 answer
  • Give four advantages for ssd compared to hdd
    15·2 answers
  • What is the role of the memory in a computer ​
    11·1 answer
  • Which of the following describe the characteristics of a good logo? Choose all that apply. It is a complex design It is memorabl
    12·1 answer
  • One word for The characters typed by a user using a<br> keyboard.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!