Document 2
Document 2
1\6\25 Holiday
7\6\25 Holiday
8\6\25 Holiday
27\5\25
On the first day sir gave his introduction to all
students in lectures what will be the goal of this
internship. First sir told about the company. They
started this company 11 years ago. They introduce
to there colleague and out mentor. Our mentor
was a professor in parul university and our mentor
name is heena patel. Our first day was only about
introduction of ourself and professor that will
teach us about the AI\ML.
28\5\25
In day 2 they teach us how to print in python. That
you don’t need extention to print in python. How
to add single and multi line comment and other
function are below.
1. \n (Newline)
This moves the cursor to the next line.
2.Escape sequence:\t
This inserts a horizontal tab space
3. \b (Backspace)
This moves coursor the character before it.
This will not show in python but it will show
turbo c.
4. \r (Carriage Return)
This returns the cursor to the beginning of
the line and overwrites the text.
29\5\25
In day 3 they teach us some operators of python
like int,float,Boolean,input etc. and one feature of
that user can import files.
1.Float
Float can assign numeric value.
\
But float cannot assign charters.
2.Boolean
A Boolean represents either True or False.
Some values are treated as False (called Falsy),
like 0, None, empty string/list/dict.
Everything else is treated as True (called Truthy).
Only empty Boolean will return false.
3.Input
Used to take input from the user.
It always returns data as a string.
If you need numbers, you must convert the input
Often used in programs that need user
interaction.
4. import
In Python is used to include and use code from
external modules or libraries in your program.
1.If
Used to run a block of code only if a condition
is true.
Input:
Output:
2.if……else
Runs one block if condition is true, otherwise
runs another block.
If the condition is true, one block runs.
If false, the else block runs.
Input:
Output:
3.Elif:
elif stands for "else if" and is used to check
multiple conditions after an if.
It runs only if the previous if (or elif) is false,
and its own condition is true.
You can use many elif statements in one
program, but only one block will run—the first
one that is true.
Input:
Output:
2\6\25
In day 5 we studied different casing methods and
eval keyword.
1.Match case:
Introduced in Python 3.10, match-case is used for
pattern matching, similar to a switch-case in other
languages.
It allows you to compare a value against multiple
patterns and run the code for the first matching
case.
More powerful and readable when checking many
possible values or complex conditions.
Input:
Output:
2.eval
eval() takes a string and executes it as a Python
expression.
It evaluates the string and returns the result of
that expression.
Useful for dynamically running Python code
stored as text but can be risky if used with
untrusted input (security risk).
Input:
Output:
3.duplicate casing:
Case have if one case have two output it will run
first output then other will skip other output.
Input:
Output:
4.Conditional case
You can add conditions to a case using an if
guard.
This allows the case to match only if both the
pattern matches and the condition is true.
Input:
Output:
3\6\25
In day 6 they explain about iterable objects.
An iterable is any object in Python that you can
loop through (iterate over) using a for loop
🔹 Common Iterable Objects:
Strings → sequence of characters
Lists → ordered collection of items
Tuples → immutable sequences
Dictionaries → keys and values
Sets → unordered unique items
Range → sequence of numbers
Input:
Comment is output
4\6\25
In day 7 we learn about list.
A list is a built-in data type used to store multiple
items in a single variable.
It is ordered, changeable (mutable), and allows
duplicate values.
🔹 Features of a List:
Written with square brackets: [ ]
Can hold different data types: numbers,
strings, even other lists
Supports indexing and slicing (positions start
from 0)
You can add, remove, or change elements
Output:
Deleting in list
Input:
Output:
Add in list
Input:
Output:
Inserting in list
Input:
Output:
6\6\25
In day 9 some list topic are remaining in last day
so they explained it but I explained it in aboves
day.example of remaining list topics.
Unpacking
Input:
Output:
Packing
Input:
Output:
Length of list
Input:
Output:
Min
Find minimum number or minimum length of
charater
Input:
Output:
Max
Find maximum number
Sum
Find sum of list. If list has charater its value is 0
Input:
Output:
Sort
Sort will sort list by alpha betical order or numbers
Input:
Output: