Internship Daily Task Report
Internship Daily Task Report
Internship Daily Task Report
Assignment Operators:
Operator Example Same As
= x = 5 x = 5
+= x += 3 x = x + 3
-= x -= 3 x = x - 3
*= x *= 3 x = x * 3
/= x /= 3 x = x / 3
%= x %= 3 x = x % 3
//= x //= 3 x = x // 3
**= x **= 3 x = x ** 3
&= x &= 3 x = x & 3
|= x |= 3 x = x | 3
^= x ^= 3 x = x ^ 3
>>= x >>= 3 x = x >> 3
<<= x <<= 3 x = x << 3
Logical Operators:
Operato Description Example
r
and Returns True if both statements x < 5 and x < 10
are true
or Returns True if one of the x < 5 or x < 4
statements is true
not Reverse the result, returns False not(x < 5 and x < 10)
if the result is true
Comparison (Relational) Operators:
Operator Name Example
== Equal x == y
!= Not equal x != y
> Greater than x > y
< Less than x < y
>= Greater than or equal to x >= y
<= Less than or equal to x <= y
Bitwise Operators:
Operator Name Description
& AND Sets each bit to 1 if both
bits are 1
| OR Sets each bit to 1 if one of
two bits is 1
^ XOR Sets each bit to 1 if only one
of two bits is 1
~ NOT Inverts all the bits
<< Zero fill left Shift left by pushing zeros in
shift from the right and let the
leftmost bits fall off
>> Signed right Shift right by pushing copies
shift of the leftmost bit in from
the left, and let the
rightmost bits fall off
Membership Operators:
Operato Description Example
r
in Returns True if a sequence with the x in y
specified value is present in the object
not in Returns True if a sequence with the x not in y
specified value is not present in the
object
Identity Operators:
Operator Description Example
is Returns True if both variables x is y
are the same object
is not Returns True if both variables x is not
are not the same object y
2. EXPLAIN STRUCTURED, UNSTRUCTURED, SEMI STRUCTURED DATA
WITH EXAMPLE?
A: These are 3 types: Structured data, Semi-structured data, and Unstructured
data.
1.Structured data –
Structured data is data whose elements are addressable for effective analysis.
It has been organized into a formatted repository that is typically a database.
It concerns all data which can be stored in database SQL in a table with rows and
columns. They have relational keys and can easily be mapped into pre-designed
fields.
Today, those data are most processed in the development and simplest way to
manage information. Examples include names, dates, addresses, credit card
numbers, stock information, geolocation, etc.
2.Semi-Structured data –
Semi-structured data is information that does not reside in a relational database but
that has some organizational properties that make it easier to analyse.
With some processes, you can store them in the relation database (it could be very
hard for some kind of semi-structured data), but semi-structured exist to ease space.
Examples are: Rich media. Media and entertainment data, surveillance data,
geo-spatial data, audio, weather data.
3.Unstructured data –
Unstructured data is a data which is not organized in a predefined manner or does
not have a predefined data model; thus, it is not a good fit for a mainstream relational
database.
So, for unstructured data, there are alternative platforms for storing and managing, it
is increasingly prevalent in IT systems and is used by organizations in a variety of
business intelligence and analytics applications.
Example are: Word, PDF, Text, Media logs.
O/P:
||| DAY – 2
4.LIST OUT 5 METHODS OF LIST, SET AND DICTIONARY,
EXPLAIN THEM WITH EXAMPLE
A: LIST:
Lists are the build-in data-types in python that are used
to store multiple items in a single variable. The plus point
of list is that the order of list does not change, and the
items in the list are changeable (mutable) and the last
point as the list allows duplicate values too.
Example: a= [‘ABAD’,’INST’,’TECH’]
LIST Methods:
- .append(x) : Add an item to the end of the list
- .insert(i, x): Inserting an item at a given position
- .remove(x) : removing the first item from the list whose value is
equal to x
- copy(): Copying of the list
- count(): Number of elements with the specified value
- reverse() : reverse the list
CODE:
o/p:
SET:
- Sets are also used to store multiple items in a single variable.
- In set there is no order and no index.
- The down point of set data type is the value cannot be
changed once the set is created immutable
- Repetition of values are not allowed in set.
SET Methods:
a. add(): adds element to a set
b.discard(): Removes an Element from The Set
c.isdisjoint(): Checks Disjoint Sets
d.issubset(): Checks if a Set is Subset of Another Set
e.union(): Returns the union of sets
f. update(): Add elements to the set
g.clear(): remove all elements from a set
CODE:
o/p:
DICTIONARIES:
- Storing of values
- Ordered , changeable(mutable) , doesn’t allow change of values
Dictionary Methods:
a. get() - Returns the value of the specified key
b. items() - Returns a list containing a tuple for each key value
c. pair keys() - Returns a list containing the dictionary's keys
d. pop() - Removes the element with the specified key
e. popitem() - Removes the last inserted key-value pair
CODE:
O/P:
CODE:
O/P:
5.Build a student report card program which can take subject, marks as
input and return the marks of student using functions.
A: CODE:
O/P:
6.Build a program to find factorial, prime & odd - even from user input
A: CODE:
O/P:
||| DAY – 3
7.BUILD A ATM PROGRAM CONTAINING DEPOSIT AND
WITHDRAW FUNCTIONS WITH VALIDATIONS AND LOOP USING
CLASS.
A: CODE:
O/P:
8.LIST OUT 5 INBUILT LIBRARIES OF PYTHON AND USE THEIR 3
METHODS WITH EXAMPLES.
A: Inbuilt Libraries of Python include:
1-Pandas:
They are primarily used for data analysis, manipulation, cleaning, etc.
Pandas allow for simple data modelling and data analysis operations.
METHODS OF PANDAS:
(1) describe():The describe() method returns description of the data in
the DataFrame.
CODE:
O/P:
(2) memory_usage() returns a Pandas Series having the memory usage of each
column (in bytes) in a Pandas Code.
o/p:
O/P:
2-Numpy:
NumPy is a Python library used for working with arrays.
It also has functions for working in domain of linear algebra, fourier,
transform, and matrices. NumPy stands for Numerical Python.
Methods of NumPy:
O/P:
Day 4:
10.Use any external library and inbuilt library in one python program with
user input.
A: Code:
o/p:
Day 5:
12.Create a Django project with application
A:
Day 6:
13.Create multiple html files using internal css with working navigation
bar.
Day 7:
14.Create a responsive website page using bootstrap.
Day 8:
15.List out error code with explanation’
16.Create a models.py with atleast 6 different fields and foreign key.
Day 9:
17.List out 3 orm queries with example.