this is because the value returned by the input function is string (" "by default as resultin statement num num num has string value and acts as repetition operator which results in output as " to get as outputwe need to convert the data type of the value entered by the user to integer thuswe modify the program as followsnum input("enter number and 'll double it"num int(num #convert string input to #integer num num print(num nowthe program will display the expected output as followsenter number and 'll double it let us now understand what is type conversion and how it works as and when requiredwe can change the data type of variable in python from one type to another such data type conversion can happen in two wayseither explicitly (forcedwhen the programmer specifies for the interpreter to convert data type to another typeor implicitlywhen the interpreter understands such need by itself and does the type conversion automatically explicit conversion explicit conversionalso called type casting happens when data type conversion takes place because the programmer forced it in the program the general form of an explicit data type conversion is(new_data_type(expressionwith explicit type conversionthere is risk of loss of information since we are forcing an expression to be of specific type for exampleconverting floating value of into an integer typei int(xwill discard the fractional part following are some of the functions in python that are used for explicitly converting an expression or variable to different type table explicit type conversion functions in python function int(xfloat(xdescription converts to an integer converts to floating-point number - notes