computing with formulas we see that the output is as expected from the definitions of these variables above the word class preceding the types indicates that these types are defined as classes in pythona concept we will return to later it is usually not necessary to check the type of variables inside python programbut it could be very useful when learning new concepts or if your program produces errors or unexpected behavior we will encounter many more variable types in subsequent the type of variable decides how it can be usedand also determines the effects of various operations on that variable the rules for these operations are usually quite intuitive for instancemost mathematical operations only work with variable types that actually represent numbersor they have different effect on other variable typeswhen this is natural for an idea of how this works in pythonthink about some simple mathematical operations on text strings which of the following operations do you think are allowedand what are the results(iadding two strings together(iimultiplying string with an integer(iiimultiplying two stringsand (ivmultiplying string with decimal numberafter giving some thought to this questioncheck your answers by trying them in pythonhello "helloworld!print(hello helloprint(hello* strings that contain numbers are potential source of confusion consider for instance the code " print( + print( + we see that the variable is treated as text string in pythonbecause it was defined using the quotation markseven though it contains single number for the examples we have seen so farit is easy to ensure that numbers are numberssimply by not using quotation marks when they are defined howeverlater in this bookwe will write programs that read data from files or user input such data will usually be in the form of textand any numbers will be text strings similar to the variable above before using the numbers in calculationswe therefore need to convert them to actual numberswhich can be done with the built-in function floatx float( float( print(type( )print(type( )print( +