43 solutions available
Question 1What will be the output of the function given below?>>import math >>abs(math.sqrt(25))Error5-55.0
Question 2A ............... function allows us to write a single record into each row of a CSV file.
Question 3Does the Primary key of a table accept null or duplicate value? Justify.
Question 4Identify the Domain name and URL from the following: http://www.income.in/home.aboutus.html
Question 5Which protocol is used to create a connection with a remote machine?
Question 6Which of the following cannot be returned by random.randrange(4) ?032.3None of these
Question 7Find errors (if any) in the following code and rewrite the code underlining each correction:x = int("Enter value of x:") for in range[0,...
Question 8Mr. William wants to remove all the rows from table INVENTORY to release the storage space but he does not want to remove the structure of...
Question 9A computer or a device that requests resources or data from the server is called ............... .
Question 10The readlines() method returns ............... (a list of lines/a list of single characters).
Question 11Write two advantages of using an Optical Fibre cable over an Ethernet cable to connect two service stations which are 200 m away from each...
Question 12What is the use of "w" in file handling?
Question 13Rewrite the following SQL statement after correcting the error(s). Underline the corrections made.INSERT IN STUDENT (RNO, MARKS) VALUE...
Question 14Write a function Push() which takes number as argument and add in a stack "MyValue".SolutionMyValue = [] def Push(number):...
Question 15Write the output of the following code:for i in range(5): print(i)
Question 16Expand the following:(a) LIFO(b) FIFO
Question 17Assertion (A): Program should check for Overflow condition before executing Push operation on stack and similarly check for Underflow...
Question 18Assertion (A): ('x' and 'y' or not 7) is a valid expression in Python.Reason (R): In Python, strings and numbers can be treated as Boolean...
Question 19(a)Define Primary Key.
Question 19(b)Define Foreign Key.
Question 19(c)Define Alternate Key.
Question 19(d)Define Candidate Key.
Question 20Write push(rollno) and pop() method in Python:push(rollno) — to add roll number in Stackpop() — to remove roll number from...
Question 21Write the output of the following code with justification if the contents of the file "VIVO.txt" are:"Welcome to Python Programming!"F1 =...
Question 22Simrat has written a code to input an integer and display its first 10 multiples (from 1 to 10). Her code is having errors. Rewrite the...
Question 23(a)Given is a Python string declaration:voice = "Python for All Learners"Write the output of:print(voice[20 : : -2])
Question 23(b)Write the output of the code given below:d1 = {"A" : "Avocado", "B" : "Banana"} d2 = {'B' : 'Bag', 'C' : 'Couch'} d2.update(d1)...
Question 24What will the following snippet print?L5 = [1500, 1800, 1600, 1200, 1900] begin = 1 sum = 0 for c in range(begin, 4): sum = sum +...
Question 25Consider the following two SQL commands with reference to a table, named MOVIES, having a column named Director:(a) Select Distinct...
Question 26Write a function WordsList(S), where S is a string. The function returns a list, named Words, that stores all the words from the string...
Question 27In a database BANK, there are two tables with a sample data given below:Table:...
Question 28(a)Write a function begEnd() in Python to read lines from text file 'TESTFILE.TXT' and display the first and the last character of every...
Question 28(b)Write a function reverseFile() in Python to read lines from text file 'TESTFILE.TXT' and display the file content in reverse order so...
Question 29(a)Consider the following table...
Question 29(b)Write a Python code to insert a new record as per given table Student (No, Name, Age, Department, Fee, Sex) using MySQL...
Question 30A binary file "salary.Dat" has structure [employee id, employee name, salary]. Write a function countrec() in Python that would read...
Question 31A departmental store "ABC" is considering maintaining their inventory using SQL to store data and maintain basic transactions. As a...
Question 32Sonia was writing a code to insert multiple rows in the cust.csv file. By mistake her younger sister removed some parts of it. Now she is...
Question 33To provide telemedicine facility in a hilly state, a computer network is to be set up to connect hospitals in 6 small villages (V1, V2,...
Question 34(a)Write the output of the code given below:p=8 def sum(q=5, r=6) : p=(r+q)**2 print(p, end= '#') sum(p) sum(r=3,q=2)
Question 34(b)The code given below accepts the roll number of a student and deletes the record of that student from the table STUDENT. The structure...
Question 35(a)What is meant by serialization and deserialization in the context of binary files?
Question 35(b)Shreya Sharma, a student of SMS School, has written a program to store Roman numbers and find their equivalents using a dictionary. She...