1 MARKS PYTHON IMP BY NCODERS
1)Who is the developer of python?
Guido van Rossum
2)What is the output of 30//20 and 30/20 ?
30 // 20 gives 1 (floor division)
30 / 20 gives 1.5 (float division)
3)What is the output of type?
The type() function returns the type of the object passed to it. Example: type(5)
returns <class 'int'>..
4)How to write x raised to power y in python?
You can write x ** y.
5)The python____ statement forces a specified exception to occur.
raise
6)___ keyword tell the python that function is generator.
yield
7)What is the time complexity of the merge sort?
O(n log n)
8)What is the complexity of binary search when the value of high-low is equal to
len(L)-1?
O(log n)
9)Which function is used to save plot graph to file?
savefig() in matplotlib
10)What is the full form of png?
Portable Network Graphics
11)Dynamic programming was invented by___ in ___.
Richard Bellman in the 1950s
12)In rooted binary tree, each non-root node has ___ parent.
One parent
13)Give full form of CSV.
Comma-Separated Values
14)Give full form of JSON.
JavaScript Object Notation
15)Write down regular expression statement to find out all five character long word
from string "strl" and print on string
re.findall(r'\b\w{5}\b', str1)
1 MARKS PYTHON IMP BY NCODERS
16)What is the output of following code ? import re DOB = "08-10-1980 # This is
Date of Birth" print(re.sub (r'\D', "",re.sub (r#.*$', "",DOB)))
import re
DOB = "08-10-1980 # This is Date of Birth"
print(re.sub(r'\D', "", re.sub(r'#.*$', "", DOB)))
Output: 08101980
17)What is the output of print(dataset.shape)?
It prints the dimensions (rows, columns) of dataset as a tuple, e.g., (rows,
columns).
18)What is the output of print(dataset.head(5)) ?
It displays the first 5 rows of dataset.
19)MSE stands for ___.
Mean Squared Error
20)Dependent variable is also called ___.
Target variable or Response variable
21)What is Tuple ?
A tuple is an immutable, ordered collection of elements in Python, defined
using parentheses, e.g., tuple = (1, 2, 3)
22)What is Python ?
Python is a high-level, interpreted programming language known for its
simplicity and readability, widely used in web development, data science,
automation, and more.
23)How many keywords are there in python 3.7 ?
There are 33 keywords in Python 3.7.
24)Which character is used in Python to make a single line comment ?
The # character.
25)What is Exception ?
An exception is an error that occurs during program execution, disrupting the
normal flow of a program.
26)What is Assertions ?
An assertion is a statement used to test if a condition in the code returns True;
if not, it raises an AssertionError.
27)Partition and exchange sort is ___
Quick Sort
1 MARKS PYTHON IMP BY NCODERS
28)Parent class is the class being inherited from also called?
The superclass or base class.
29)What is the default extension of PyLab Figure ?
.png
30)PyLab provides many of the facilities of ____
MATLAB
31)Which module of matplotlib library is required for plotting of graph ?
pyplot
32)___ function is used to display figure/chart.
show()
33)What is GUI?
GUI stands for Graphical User Interface, allowing users to interact with
applications through graphical elements like buttons and windows.
34)What is mainloop ()?
mainloop() is a function in GUI frameworks like Tkinter that runs the event loop
to keep the application window open and responsive.
35)What is TCL ?
TCL stands for Tool Command Language, a scripting language often used with
Tkinter for GUI development in Python.
36)What is IP Address ?
An IP address is a unique identifier for a device on a network, allowing devices
to communicate over the internet.
37)What does SQL stand for?
Structured Query Language
38)____ method executes a database query from within Python.
execute() (commonly used with the cursor object in database libraries like
sqlite3).
39)By default the order by clause sorts the result set in the ___ order.
Ascending order
40)Which package import before writing database connectivity python code ?
sqlite3 (or other specific database packages like mysql.connector or psycopg2
for MySQL and PostgreSQL, respectively)
41)IDLE stand for___
Integrated Development and Learning Environment
1 MARKS PYTHON IMP BY NCODERS
42)Who is the developer of python ?
Guido van Rossum
43)The ___ symbol is a shell prompt in phython.
>>>
44)____ method read string from the an open file in python.
read()
45)____exception catch all exception in python.
Exception
46)ADT stands for___
Abstract Data Type
47)____has a brief description about the class.
A docstring (placed inside triple quotes """)
48)___ error is raised when division or modulo by zero takes a place for all numeric
types.
ZeroDivisionError
49)PyLab is embedded with ___ module of python.
Matplotlib
50)Give full form of png.
Portable Network Graphics
51)Dynamic programming is mainly an optimization over plain ___
Recursion
52)___ function is used to display chart/figure.
show()
53)JSON stand for___
JavaScript Object Notation
54)CSV stand for___
Comma-Separated Values
55)R3egEx stand for___
Regular Expression
56)If there is no match___ will be returned, instead of the Match object.
None
57)ROC stand for
Receiver Operating Characteristic
1 MARKS PYTHON IMP BY NCODERS
58)MAE stand for
Mean Absolute Error
59)AUC stand for
Area Under the Curve
60)MSE stand for
Mean Squared Error
61)IDLE stands for
Integrated Development and Learning Environment
62)___ is a special character, which is used to represent whitespace characters
\s
63)___ is a special character, which is used for new line.
\n
64)The ___ symbol is a shell prompt in Python.
>>>
65)The ___ symbol is to set comments in Python.
#
66)Python commands are evaluated/executed in ___.
An interpreter
67)____ method writes any string to an open file in Python.
write()
68)___method reads string from an open file in Python
read()
69)ADT Stands for_.
Abstract Data Type
70)___ error is raised when a calculation exceeds maximum limit for a numeric
type.
OverflowError
71)___ error is raised when an import statement fails.
ImportError
72)___ has a brief description about the class.
A docstring (inside triple quotes """)
73)Knapsack problem is also known as ___ problem.
The optimization problem
1 MARKS PYTHON IMP BY NCODERS
74)PyLab is embedded with ___ module of Python.
Matplotlib
75)___ method displays the graphical window on the computer screen.
show()
76)Dynamic Programming is mainly an optimization over plain __
Recursion
77)RegEx stands for ___
Regular Expression
78)JSON stands for___
JavaScript Object Notation
79)Notation ___ is used to match start of string.
^
80)Notation ___ is used to match end of string.
$
81)ROC Stands for___
Receiver Operating Characteristic
82)MSE stands for___
Mean Squared Error
83)AUC Stands for___
Area Under the Curve
84)___ is informative tags to subsets of data
Labels
85)___ is the process of exploring and analyzing large datasets to make predictions
and boost data- driven decision making.
Data Mining
86)RMSE stands for__
Root Mean Squared Error
87)ROC Stands for___
Receiver Operating Characteristic
88)MAE stands for___
Mean Absolute Error