Int , Float , Str
built-in functions☺
Why We Use Int( ) :
To Take input As in Numbers Or To Print Any Thing In Numbers We Use Int( ) Type Variable.
Why We Use Float( ):
To Take input As Points Numbers Or To Print Any Thing In Points Numbers We Use Float( ) Type Variable.
Why We Use str( ):
The str( ) function converts the specified value into a string.
How To Find Any word (str, int or float)?đ
no = 12
print(type(no))
no_2 = 45.6
print(type(no_2))
no_3 = 'najwa'
print(type(no_3))
output:
<class 'int'>
<class 'float'>
<class 'str'>
Function of Print in python :
To Run or Print the Line In The Terminal We Use the Command Print
For Example:
print("You Are So Intelligent")
output:
You Are So Intelligent
Function of input in python :
To Take The Value From The User We Use The Command Input
For Example:
print("What is Your Name?\n")
output:
What is Your Name?
Fahad (User Input)