Computer Science, asked by shivansh5291, 4 months ago

05. What will be the output of the following?
Print(len (str17//411) ) )
Print(len (str17/41) ) )

Answers

Answered by Anonymous
1

Explanation: (17/14) is evaluated to a numeric data type, refered to as <class 'float'> in Python3. That datatype has some limitations. One limitation with that kind of data type is that it is typically limited to a fixed size of storage space and have to do apply some approximations. Floating point data types typically have some way to represent some exceptional results from mathematical operations. For example, division by zero may result in a special fake value, called “Inf”, or even “-Inf”, and values extremely close to zero may be rounded to zero or in some edge cases values that are so close to zero that they will be represented by an approximation with relatively bad resolution. In some other cases, the results may be represented with another value, reffered to as “NaN” (not a number), because the value is so extremely long from zero, that no reasonable approximation exist in the actual floating point storage format.

For a subrange of integers and the add, subtract and multiply operations, the float data type, manage to successfully represent a value/result in an exact way, but the purpose of the float data type is to be able to automatically fall back to store approximations of values (typically results or intermediary results), with a reasonable precision, when exact results or approximations fall into the domain of real numbers that happen to not be integers within a relatively limited range.

Similar questions