IO Operations: ============== IO ==> Input and Output Input ==> taking/reading ==> input() Output ==> giving/writing ==> print() input(): ======= Syntax: identifier = input("provide some text to display on the console") a = input("Enter some value for a:") b = input("Enter some value for a:") print(a) print(b) ==> input() can always read any value only in the format of "text (string)". a = input("Enter some value for a:") b = input("Enter some value for a:") print(a) print(b) print(type(a)) print(type(b)) Output: ======= Enter some value for a:12-23j Enter some value for a:123.45 12-23j 123.45 ==> To read any value with its corresponding format: we need to do the type conversion/type casting to the input(). Type Casting: ============= ==> also called as "Type conversion". ==> the data from one form to another form conversion is called as "Type conversion". ==> two ways for type casting: 1) Automatic type casting/Implicit Type casting ================================================ a = 100 b = 123 c = 0 print(type(a)) print(type(b)) print(type(c)) print("==============") c = b/a print(c) print(type(c)) ==> based on the operation, the computer can automatically convert the data. 2) Explicit type casting ======================== ==> based on the requirement, the programmer/user can define the conversion. ==> pre-defined/inbuilt functions: 1) int() 2) float() 3) complex() 4) bool() 5) str() 6) bin() 7) oct() 8) hex() 1) int() ========= 1) can use to convert a binary value to decimal.