Question
Consider the following Python code: text = "banana" char_to_find = 'a' count = 0 for i in range(len(text)): if text[i] == char_to_find: count += 1 if count == 2: print(i) break What will be the output of this code?
More IT Operating System Questions
- Complete the Python code to check if a string email matches a simple email pattern (e.g., [email protected]). import re def is_valid_email(email): ...
- Which of the following statement is TRUE related to Alpha Beta pruning algorithm?
- Which of the following scheduling algorithms minimizes average seek time?
- What is the primary disadvantage of using an array as a data structure?
- A semaphore is initialized to 1. If two processes P1 and P2 both try to execute a `wait()` (P) operation on this semaphore, what is the maximum number of p...
- A process makes a system call to request a resource. If the resource is unavailable, the process will typically transition to which state?
- The transfer function of the system below is ___________
- What is the space complexity of a recursive implementation of Fibonacci (without memoization) to compute the nth Fibonacci number, considering the call sta...
- A greedy algorithm is used to make change for a given amount using a set of coin denominations. For denominations {1, 5, 10, 25} and an amount of 30, it wo...
- Which SQL query correctly displays all records from EMPLOYEE_CARD where Company is Reliance, Infosys, TCS, or Cognizant?
Hey! Ask a query
Please enter email id
The email must be a valid email address.
Please enter Mobile Number
Please enter valid Mobile Number
Please enter your Doubt
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
- 200 Questions with Detailed Solutions
- Section-wise Coverage (GA, English, Quant & Reasoning)