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

Python PT 1

python notes class 11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Python PT 1

python notes class 11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

PYTHON PT1

1. Conversation functions : int(), float(), bool() and str()


int() float()

Converts a value to an integer. Converts value to float

Str( ) bool( )

2. Input( )
Inbuilt func. Used to get input from the user. By default the input taken by this function is str. So you
have to tell it to accept it as int if you want to do integer.

3. Print( )

Can be used to combine variable and text.

Ex: a= “bbg” , b= “nigga” , z= a + b

print(“I am” + z)

Cannot be used to combine string and number.

4. Assignment operators
the id() function is used to get the identity (memory address) of an object. Every object in
Python has a unique identity, which serves as its address in memory. The id() function returns this
unique identifier as an integer.

You might also like