Important MCQ from PYQ-01By admin / December 2, 2025 Important MCQs from PYQs Important MCQs from PYQs 1 / 39 Assertion–Reasoning A: CSV is a file format for data storage like a text file.R: Records are stored line-by-line with fields separated by commas. A) A & R true, R explains A B) A & R true, R does not explain A C) A true, R false D) A false, R true 2 / 39 Assertion–Reasoning A: Positional arguments match number & order in a function call.R: Default arguments come first and then positional arguments. A) A & R true, R explains A B) A & R true, R does not explain A C) A true, R false D) A false, R true 3 / 39 For Python–SQL connection, which argument is NOT necessary in connect()? A) host B) database C) user D) password 4 / 39 Which function displays the total number of records in a table? A) sum() B) total() C) count() D) return() 5 / 39 Output of: print(15.0 / 4 + (8 + 3.0)) A) 14.75 B) 14.0 C) 15 D) 15.5 6 / 39 ______ is a communication methodology for delivering voice & multimedia over IP. A) VoIP B) SMTP C) PPP D) HTTP 7 / 39 SELECT with __________ clause returns records without repetition. A) DESCRIBE B) UNIQUE C) DISTINCT D) NULL 8 / 39 The correct syntax of seek() is: A) file_object.seek(offset [, reference_point]) B) seek(offset [, reference_point]) C) seek(offset, file_object) D) seek.file_object(offset) 9 / 39 _________ is a non-key attribute derived from a primary key of another table. A) Primary Key B) Foreign Key C) Candidate Key D) Alternate Key 10 / 39 Which statement(s) will give an error? A) Statement 3 B) Statement 4 C) Statement 5 D) Statement 4 and 5 11 / 39 Which command deletes a table in MySQL? A) DELETE TABLE B) DROP TABLE C) REMOVE TABLE D) ALTER TABLE 12 / 39 ______ command is used to remove primary key from a table in SQL. A) update B) alter C) remove D) drop 13 / 39 Which mode generates an error if the file does not exist? A) a+ B) r+ C) w+ D) None of the above 14 / 39 Output of the code: a = "Year 2022 at All the best" a = a.split('2') b = a[0] + ". " + a[1] + ". " + a[3] print(b) A) Year . 0. at All the best B) Year 0. at All the best C) Year . 022. at All the best D) Year . 0. at all the best 15 / 39 What will be the output of: not True and False or True A) True B) False C) NULL D) NONE 16 / 39 Which statement will merge the contents of both dictionaries? A) dict_exam.update(dict_result) B) dict_exam + dict_result C) dict_exam.add(dict_result) D) dict_exam.merge(dict_result) 17 / 39 Which of the following is an invalid datatype in Python? A) Set B) Integer C) None D) Real 18 / 39 State True or False “Variable declaration is implicit in Python.” A) True B) False 19 / 39 The input() function always returns a value of type: A) Integer B) Complex C) Float D) String 20 / 39 The fundamental building blocks of a Python program are: A) Identifier B) Constant C) Punctuators D) Tokens 21 / 39 import math math.ceil(1.03) + math.floor(1.03) A) 30 B) 3.0 C) -3.0 D) 3 22 / 39 Output: 7 * (8 / (5 // 2)) A) 28 B) 28.0 C) 20 D) 60 23 / 39 Which statement gives output True? A) not -5 B) not 5 C) not 0 D) not (5-1) 24 / 39 a, b = 4, 2.5 a - b // 2**2 A) 4.0 B) 4 C) 0 D) None 25 / 39 a, b = 4, 2 a + b**2 * 10 A) 44 B) 88 C) 40 D) 48 26 / 39 Output of: 4 + 2**2 * 10 A) 18 B) 80 C) 44 D) None of these 27 / 39 Output of: 4 // 3.0 A) 1 B) 1.0 C) 1.3333 D) None of these 28 / 39 Which one is an arithmetic operator? A) not B) ** C) & D) ? 29 / 39 Identify the membership operator: A) in B) not in C) both A & B D) None of these 30 / 39 Which of the following is a logical operator? A) + B) /= C) and D) in 31 / 39 Which of the following is a relational operator? A) > B) // C) or D) ** 32 / 39 Which of the following is a valid identifier? A) 9type B) _type C) Same-type D) True 33 / 39 A foreign key refers to ______. A) Primary key in same table B) Primary key in another table C) Unique key D) Candidate key 34 / 39 A candidate key is ______. A) Key with highest value B) Minimal set of attributes that uniquely identify tuples C) Redundant key D) None 35 / 39 A primary key must be ______. A) Unique B) Not Null C) Optional D) Both A & B 36 / 39 Domain refers to ______. A) Set of allowed values B) Column name C) Row value D) Table size 37 / 39 The number of rows in a relation is called ______. A) Cardinality B) Degree C) Domain D) Tuple Count 38 / 39 The number of columns in a relation is called ______. A) Cardinality B) Degree C) Domain D) Attribute 39 / 39 Columns in a table are called ______. A) Attributes B) Tuples C) Fields D) Both A & C Your score isThe average score is 0% 0% Restart quiz