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