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.