0% found this document useful (0 votes)
18 views

Python Notes

Uploaded by

Sonal Thakur
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Python Notes

Uploaded by

Sonal Thakur
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

day-1, (22/10/2024)

1. Python is general purpose programming language.


2. Python is interpreter base language.
3. Python is case senstive language.
4. Python is developed by Gudeo Von Rossum in 1991.
5. Python is language that based on multiple library.
6. Python is Gulable language.
7. Python is secure and compact language.
8. Python is work inside PVM(Python Virtual Machine).It is not work on operating
sysytem.
9. Python is plateform independent language.
10. Python is Dynamic language.
11. Python is pure Object Oriented language.
Every things in python is either class or object
12. Python can not declared variable it only assign value and they can
automatically assign the member class
13. Python don't have any data type.
14. Python have six basic classes that are used as data assignment.
15. Python can not declared vriable.
1. int
123123
2. str
'555555' or "tam"
3. float
25555.55
4. bool
True/False
5. complex
434j
6. Nonetype
None

###how check python install or not


--open command prompt
python --version

Python inbuilt editor is IDLE

>>>Immidiate prompt
type()- type() return class information of object.

Python Operator
1. Arithmetic Operator
+ - * /(division that return float value)
//(division that return int value floor value)
Exponential or Power 2**3
% Modulos (Remainder return)
2. Assignment Operator
= value are assign right to left
i=10
+=
i+=1 or i=i+1
-=
*=
/=
//=
=
%=
3. Comparison Operator(it return True/False)
== equality operator
!= not equal to
> greater than
< less than
<= less than equal to
>= greater than equal to
4. Logical Operator
and (it use with 2 condition and return true if both condition true)
or (either or any one the condition are true then it return true)
not (reverse if True then return False otherwise it return Ture)
5. Identity Operator(True/False)
is
is not
6. Membership Operator(True/False)
in
not in
7. Bitwise Operator
& AND
! Or
^ XOR
~ NOT
<< left shift
>> right shift

Decimal Binary
0 00000000
1 00000001
2 00000010
3 00000011
4 00000100
5 00000101
6 00000110
7 00000111
8 00001000
9 00001001
10 00001010
11 00001011

i=10 00001010

i<<2 00101000 40
i>>2 00000010 2

-----------------------------------------------------------------------------------
---------------
day-2
1.rint("constant",variable)
2.rint bydefault use \n it maens next line
3.rint('welcome',end='')
4.ype()
5.vm(python virtual machine)
6.source code(.py)--->python interpreter--->bytecode--->
7.ompile(compiler)--->Native code

{ no curly braces
}
i=0;
8.range()
range(start,stop,step)
* start ,step are optional(because start by default 0 and step default +1)
* stop always work on n-1(if stop value is 10 then it work till 9)

9.Loop
looping statement in python only 2
for(basket loop)'
while(pre loop)
for loop

for object in collection:


logic
else:
logic

else is optional but if you mention else then it must execute when basket are
empty.
input()-input method accept default string value.
But whenever you need you can convert these string by using
int(),float(),bool(),complex()etc.

enter name and five subject marks and print name total marks and percentage
'''
1
121
12321
1234321
123454321

You might also like