Professional Documents
Culture Documents
WEEK1
WEEK1
DAY 1 [07-06-2023]
On day 1 we were started by seeing the introduction video of SUMAGO INFOTECH. By watching
that we get to know about many things about the company and their working environment. In those
videos we also got information about how does this company work and helps interns to get the
knowledge and the training about their module.
We honoured the guest by giving him the rose flower and the water bottle of the SUMAGO water
bottle. Then he shared his very informative and valuable thought and knowledge with us.
The SUMAGO gave us (Interns) the Welcome kit of the company containing
1. Water Bottle
2. Coffee Mug
3. Writing Pad
4. Note pad
5. Pen
SUMAGO INFOTECH PVT LTD WEEk 1
DAY 2 [08-06-2023]
We Downloaded the python version 3.8.10 from python.org and then installed it on our PC.
Then we Downloaded VS Code from code.visualstudio.com and installed it on our PC and also
installed the python extension on vs code to execute the python programs.
Introduction to Python:
Features of Python:
1. Simple.
2. Freeware and open Source.
3. Platform Independent.
4. Dynamically Typed Programming.
5. High level Programming.
6. Interpreted Programming.
7. Robust(strong).
8. Procedural and Object-Oriented.
9. Embedded.
10. Supports Third party APIs.
SUMAGO INFOTECH PVT LTD WEEk 1
5. if else condition:
Syntax: if condition:
Statements to execute if condition is True.
else:
Statements to execute if condition is false.
SUMAGO INFOTECH PVT LTD WEEk 1
Ontime Task:
Source Code:
Name,Std,Div=(input("Enter Name,Standard,Division ")).split()
print(Name,Std,Div)
Output:
Task:
1. What is floor Division (//):
It is an operator which is used for dividing 2 numbers but it has slight change
from the normal division operator, in floor division the quotient is rounded off
to the nearest whole number.
Example:
Code:
a=19
b=5
print(a//b)
Output:
You can clearly see that when we divide 19 by 5 the answer should be in decimal
number which is 3.8 but in floor division the number is rounded off to 3.
2. Precedency:
there is a rule of precedence in Python. It guides the order in which arithmetic operations are
carried out.
The below table show the precedence of operators by the PVM, The upper operators have higher
precedence than lower ones.
SUMAGO INFOTECH PVT LTD WEEk 1
Precedency Table:
Operators Meaning
() Parentheses
** Exponent
+, - Addition, Subtraction
^ Bitwise XOR
| Bitwise OR
==, !=, >, >=, <, <=, is, is not, in, not in Comparisons, Identity, Membership operators
Or Logical OR
Associativity of Operator:
SUMAGO INFOTECH PVT LTD WEEk 1
We can see in the above table that more than one operator exists in the same group. These
operators have the same precedence.
When two operators have the same precedence, associativity helps to determine the order of
operations.
Associativity is the order in which an expression is evaluated that has multiple operators of
the same precedence. Almost all the operators have left-to-right associativity.
For example, multiplication and floor division have the same precedence. Hence, if both of
them are present in an expression, the left one is evaluated first.
Example:
Code:
# Left-right associativity
# Output: 3
print(5 * 2 // 3)
# Output: 0
print(5 * (2 // 3))
Output:
DAY3[09-06-2023]
SUMAGO INFOTECH PVT LTD WEEk 1
Indexing:
The indexing in python starts from 0 ,1,2 and so on and also in reverse which starts from -1, -2 which
is assigned to last element of the list, Tuple, Dictionary.
Example:
Code:
a="Hello"
print(a[0])
Output:
H*