Which of the following is not a keyword in python language?
1 Crore+ students have signed up on EduRev. Have you? Download the App |
Which of the following is the correct way to call a function?
What is the syntax to work with the database?
Which of the following components is/are part(s) of a function header in python?
What is the global system of interconnected computer networks called?
Syntax of the seek function in python is myfile.seek(offset, reference_point) where myfile is the file object. What is the default value of reference_point?
Read the statements given below and choose the correct answer:
Statement A: It is very difficult to organize unstructured data.
Statement B: CSV helps into organize a huge amount of data in a proper and systematic way.
Two statements are given below:
Statement I: The order of items in the output of the map() method in Python is same as the order in the input iterable.
Statement II: The order of items in the output of the map() method in Python is sorted in ascending order.
Directions: Match the contents under List I with those under List II.
In a relational schema, each tuple is divided into fields called
A ________ computer is a large and expensive computer capable of simultaneously processing data for hundreds or thousands of-users.
Assume that the position of the file pointer is at the beginning of 3rd line in a text file. Which of the following option can be used to read all the remaining lines?
Which of the following items are present in the function header?
Given Tuple: tup1= (10, 20, 30, 40, 50, 60, 70, 80, 90)
What will be the output of print (tup1 [3:7:2])?
Identify the output of the following Python statements.
x = [[10.0, 11.0, 12.0],[13.0, 14.0, 15.0]]
y = x[1][2] print(y)
Which of the following operation easily performed by using a single stack?
Operation 1: Job Scheduling
Operation 2: Reversing the elements
Consider the following program.
def sample():
stack = []
return stack
What does the sample function return?
Consider the following infix expression. what is the prefix expression for a given infix expression?
Infix: ((8+9)*(7-6))
Which of the following data structure is suitable for checking Valid Parentheses?
Consider the following program.
Here stack parameter is an empty stack and the item is an element.
def sample(stack, item):
stack.append(item)
What does the sample function do?
Consider the following program. Here glass stack is an empty stack.
def check(glassStack):
if len(glassStack)==0:
return True
else:
return False
What does the check function return?
Consider the input sequence a, b, c, d.
Minimum number of operations(push or pop) required to get stack permutation for sequence b, d, c, a?
Hint:
A stack permutation is a permutation of items in the supplied input queue that is accomplished by transferring elements from the input queue to the output queue using a stack and the built-in push and pop operations.
Example 1:
Consider array has 4 elements and a searching element 16.
A[4]= {10, 16, 22, 25}
The number of iterations are required to search an element by using a binary search= T1
Example 2:
Consider array has 4 elements and a searching element 22.
A[4]= {10, 16, 22, 25}
The number of iterations are required to search an element by using a binary search= T2
Note: Searching is successful.
Which of the following statement are true?
Which statement is generally used in the beginning of the function or after a function call to check for valid input?
Which of the following is true about binary search?
Statement 1: The pre-condition for the binary search is that the elements must be arranged in sorted order.
Statement 2: Binary search is based on the divide and conquers approach.