User Input and Type Casting in Python:
We can use the PyCharm code editor for this example. If you do not know about it then follow this link- How to install PyCharm for Python and create a program in it. |
(1) In Python, we have the input() function for taking the user input. The input() function prompts the user to enter data. It accepts all user input as a string. The user may enter a number or a string but the input() function treats them as strings only.


(2) Type Casting is a technique for converting a variable’s data type to a specific data type to conduct the action requested by users.


Using the eval function you can also add int and float values with binary values and get the desired result.
Comments (No)