Answer:
index = 3
Explanation:
the find() function finds the first instance of a letter or word.
'b' = 0
'A' = 1
'n' = 2
'a' = 3
'n' = 4
'a' = 5
the first instance of 'a' in "bAnana" is found at index location 3 computer scientist start counting from zero.
Program Explanation:
In the given code, a variable "word" is declared that initializes with a string value that is "bAnana".In the next line, an "index" variable is defined that uses a "word" variable with the find method that prints the index value of "a".Using the print method, that prints the "index" value.Program:
word = 'bAnana' #defining a variable word that initializes with string value
index = word.find('a')#defining a variable index that calls the find method to print index value of a
print(index)#print index value
Output:
Please find the attached file.
Reason for the output:
Since the array of indexing starts with 0 so, the index value of "a" is "3".
Learn more:
brainly.com/question/13437928
Write a program that prompts users to pick either a seat or a price. Mark sold seats by changing the price to 0. Use overloaded methods to implement seat allocation: When a user specifies a seat (row, column), make sure it is available. When a user specifies a price, find any seat with that price. Write appropriate responses to the user if the seat is already taken, if their seat is available, or the seat number of the assigned seat if they just specified a price, etc.
A theater seating chart is implemented as a two-dimensional array of ticket prices, like this:_______.
10 10 10 10 10 10 10 10 10 10
10 10 10 10 10 10 10 10 10 10
10 10 10 10 10 10 10 10 10 10
10 10 20 20 20 20 20 20 10 10
10 10 20 20 20 20 20 20 10 10
10 10 20 20 20 20 20 20 10 10
20 20 30 30 40 40 30 30 20 20
20 30 30 40 50 50 40 30 30 20
30 40 50 50 50 50 50 50 40 30
Answer:
Answer is given in the attached document.
Explanation:
Explanation is given in the attached document.
Answer:
i do not know
Explanation: