44 solutions available
Question 1State True or False:The Python interpreter handles logical errors during code execution.
Question 2Identify the output of the following code snippet:text = "PYTHONPROGRAM" text = text.replace('PY', '#')...
Question 3Which of the following expressions evaluates to False ?not(True) and FalseTrue or Falsenot(False and True)True and not(False)
Question 4What is the output of the expression ?country = 'International' print(country.split("n"))('I', 'ter', 'atio', 'aI')['I', 'ter', 'atio',...
Question 5What will be the output of the following code snippet ?message = "World Peace" print(message[-2::-2])
Question 6What will be the output of the following code ?tuple1 = (1, 2, 3) tuple2 = tuple1 tuple1 += (4, ) print(tuple1 ==...
Question 7If my_dict is a dictionary as defined below, then which of the following statements will raise an exception ?my_dict = {'apple' : 10,...
Question 8What does the list.remove(x) method do in Python ?Removes the element at index x from the listRemoves the first occurrence of value x from...
Question 9If a table which has one Primary key and two alternate keys. How many Candidate keys will this table have ?1234
Question 10Write the missing statement to complete the following code:file = open("example.txt", "r") data = file.read(100) ............... #Move the...
Question 11State whether the following statement is True or False:The finally block in Python is executed only if no exception occurs in the try...
Question 12What will be the output of the following code ?c = 10 def add(): global c c = c + 2 print(c, end = '#') add() c = 15 print(c,...
Question 13Which SQL command can change the degree of an existing relation ?
Question 14What will be the output of the query ?SELECT * FROM products WHERE product_name LIKE 'App%';Details of all products whose names start with...
Question 15In which datatype the value stored is padded with spaces to fit the specified length.DATEVARCHARFLOATCHAR
Question 16Which aggregate function can be used to find the cardinality of a table ?sum()count()avg()max()
Question 17Which protocol is used to transfer files over the Internet ?HTTPFTPPPPHTTPS
Question 18Which network device is used to connect two networks that use different protocols ?ModemGatewaySwitchRepeater
Question 19Which switching technique breaks data into smaller packets for transmission, allowing multiple packets to share the same network resources.
Question 20Assertion (A): Positional arguments in Python functions must be passed in the exact order in which they are defined in the function...
Question 21Assertion (A): A SELECT command in SQL can have both WHERE and HAVING clauses.Reasoning (R): WHERE and HAVING clauses are used to check...
Question 22How is a mutable object different from an immutable object in Python ?Identify one mutable object and one immutable object from the...
Question 23Give two examples of each of the following:Arithmetic operatorsRelational operators
Question 24If L1 = [1, 2, 3, 2, 1, 2, 4, 2, ...], and L2 = [10, 20, 30, ...], then(Answer using builtin functions only)(a) Write a statement to count...
Question 25Identify the correct output(s) of the following code. Also write the minimum and the maximum possible values of the variable b.import...
Question 26The code provided below is intended to swap the first and last elements of a given tuple. However, there are syntax and logical errors in...
Question 27-I(a)What constraint should be applied on a table column so that duplicate values are not allowed in that column, but NULL is allowed.
Question 27-I(b)What constraint should be applied on a table column so that NULL is not allowed in that column, but duplicate values are allowed.
Question 27-II(a)Write an SQL command to remove the Primary Key constraint from a table, named MOBILE. M_ID is the primary key of the table.
Question 27-II(b)Write an SQL command to make the column M_ID the Primary Key of an already existing table, named MOBILE.
Question 28(a)List one advantage and one disadvantage of star topology.
Question 28(b)Expand the term SMTP. What is the use of SMTP ?
Question 29(a)Write a Python function that displays all the words containing @cmail from a text file "Emails.txt".
Question 29(b)Write a Python function that finds and displays all the words longer than 5 characters from a text file "Words.txt".
Question 30(a)You have a stack named BooksStack that contains records of books. Each book record is represented as a list containing book_title,...
Question 30(b)Write the definition of a user-defined function push_even(N) which accepts a list of integers in a parameter N and pushes all those...
Question 31(a)Predict the output of the following code:d = {"apple": 15, "banana": 7, "cherry": 9} str1 = "" for key in d: str1 = str1 +...
Question 31(b)Predict the output of the following code:line = [4, 9, 12, 6, 20] for I in line: for j in range(1, I%5): print(j, '#',...
Question 32Consider the table ORDERS as given...
Question 33A csv file "Happiness.csv" contains the data of a survey. Each record of the file contains the following data:Name of a countryPopulation...
Question 34Saman has been entrusted with the management of Law University Database. He needs to access some information from FACULTY and COURSES...
Question 35A table, named STATIONERY, in ITEMDB database, has the following...
Question 36Surya is a manager working in a recruitment agency. He needs to manage the records of various candidates. For this, he wants the following...
Question 37Event Horizon Enterprises is an event planning organization. It is planning to set up its India campus in Mumbai with its head office in...