Professional Documents
Culture Documents
UNIT -4
10.What is Colab?
Colaboratory, or “Colab” for short, is a product from Google Research.
Colab allows anybody to write and execute arbitrary python code through the
browser, and is especially well suited to machine learning, data analysis and
education.
More technically, Colab is a hosted Jupyter notebook service that requires no setup
to use, while providing access free of charge to computing resources including
GPUs.
14.What is String?
String is collection of characters. All string methods return new values.
They do not change the original string. Strings in python are surrounded by either
single quotation marks, or double quotation marks.
17.What is comment?
A comment is a piece of code that are not executed.
Comments are used to explain the source code and to make the code more readable
and understandable.
They are used for documentation purpose.
21.What is error?
Errors are problems that occur in the program due to an illegal operation performed
by the user or by the fault of a programmer, which halts the normal flow of the
program.
Errors are also termed bugs or faults. There are mainly two types of errors in python
programming.
24.What is Exception?
Even if a statement or expression is syntactically correct, it may cause an error when
an attempt is made to execute it (at run time).
Errors detected during execution are called exceptions
if condition1:
# Statements1
if condition2:
# Statements2
else:
# Statements3
else:
# Statements4
while condition:
# Statements
41.What is List?
A list is a data structure in Python that is a mutable, or changeable, ordered sequence
of elements.
Each element or value that is inside of a list is called an item.
It allows duplicate values and created by square brackets.
42.What is Tuple?
A tuple is a data structure in Python that is a immutable, ordered sequence of
elements.
Each element or value that is inside of a tuple is called an item.
It allows duplicate values and created by round brackets.
43.What is Set?
A set is a data structure in Python that is a mutable, or changeable, not a ordered
sequence of elements.
Each element or value that is inside of a set is called an item.
It does not allows duplicate values and created by curly braces.