CBSE Class 12 Python Revision & Practice Hub Welcome to the Python Quiz (Class 12).Time is up! Your quiz has been submitted automatically. Thank you for participating.Quiz CBSE PREVIOUS YEAR MCQ Please continue and access the quiz. Basic Data Types, Operators, Input / Output 1 / 50Which logical operator returns True if at least one condition is true? and or xor not 2 / 50Which operator checks if a value exists inside a list? exists in find has 3 / 50What is the output of bool(0)? None Error False True 4 / 50Which method adds an element to the end of a list? push() append() add() insert() 5 / 50What is the output of 2 ** 3? 5 6 9 8 6 / 50How do you start a formatted string (f-string)? fmt f str r 7 / 50Which brackets are used to define a dictionary? () [] {} || 8 / 50Which operator checks if two values are equal? == = != 9 / 50Which function is used to take input from the user? input() scan() get() read() 10 / 50Which of these is a valid boolean value in Python? True true TRUE yes 11 / 50How do you write a multi-line comment string in Python? /* */ // ''' ''' 12 / 50What is the return type of the input() function? bool int str float 13 / 50Which function returns the data type of a variable? id() check() typeof() type() 14 / 50Which operator returns the remainder of a division? % / ** // 15 / 50What is the output of 5 + 2 * 3? 21 13 15 11 16 / 50Which keyword is used to define a function? define func def function 17 / 50What is the result of 3 * ‘A’? Error A3 AAA 3A 18 / 50Which data type is immutable? set tuple dict list 19 / 50Which data type stores decimal values? str float int bool 20 / 50Which logical operator returns True only if both conditions are true? not and if or 21 / 50How do you access the value associated with key ‘k’ in dict d? d('k') d['k'] d.k d->k 22 / 50What is the output of bool(1)? Error True None False 23 / 50Python is a ______ typed language. Dynamically Non Weakly Statically 24 / 50Which logical operator reverses the boolean result? not ! reverse invert 25 / 50What happens if you use a Python keyword as a variable name? Variable is created hidden It works fine SyntaxError Warning 26 / 50Which function gives the unique memory address of an object? ref() mem() id() addr() 27 / 50Which operator is used for addition in Python? + / * – 28 / 50What sequence does range(3) generate? 0, 1, 2 1, 2 1, 2, 3 0, 1, 2, 3 29 / 50What is int(3.9)? 3 Error 3.9 4 30 / 50Which operator represents ‘not equal to’? == != not 31 / 50What is the result of ’10’ + ’20’? 10 + 20 Error 30 1020 32 / 50Which symbol is used to assign a value to a variable? : -> == = 33 / 50How do you convert the integer 5 to a float? str(5) float(5) int(5) 5.0() 34 / 50Is Python case-sensitive? Sometimes No Only for strings Yes 35 / 50What is the output of len(‘Python’)? 7 6 5 4 36 / 50Which parameter in print() changes the separator between arguments? sep split break end 37 / 50What is the output of print(type(1/2))? Error 38 / 50Which operator checks if two variables point to the same object in memory? in == is equal 39 / 50What is the file extension for Python files? .py .pt .pi .python 40 / 50What is the output of print(10 // 3)? 3.0 3 3.33 4 41 / 50If s = ‘Python’, what is s[0]? y 0 P n 42 / 50Which brackets are used to define a list? [] {} () 43 / 50Which escape character represents a new line? b n / t 44 / 50Which of these is a complex number in Python? 5c complex(5) 5j 5i 45 / 50Which function is used to output text to the console? out() print() write() echo() 46 / 50Which symbol is used for single-line comments? — # // /* 47 / 50Which parameter in print() prevents a new line at the end? end stop line sep 48 / 50Which brackets are used to define a tuple? [] {} () 49 / 50Which of these is an INVALID variable name? var1 1var _var my_var 50 / 50If s = ‘Python’, what is s[-1]? o P Error n Your score isThe average score is 44% LinkedIn Facebook 0% π Click here for Python Book Next Chapter β
Comments are closed.