
Sets the integer starting value used in generating random numbers. X rounded to n digits from the decimal point. The integer part is returned as a float.Ĭonverts angle x from degrees to radians.Ī randomly selected element from range(start, stop, step) The fractional and integer parts of x in a two-item tuple. Returns the Euclidean norm, sqrt(x*x + y*y). Returns the arc tangent of x, in radians.Ī random item from a list, tuple, or string.Ĭonverts angle x from radians to degrees. Returns the ratio of the circumference of a circle to its diameter. Returns the mathematical constant e, the base of natural logarithms. The table below lists the properties and methods available in Python. The object contains properties and methods that correspond to some frequently used constants and mathematical operations. To perform mathematical operations with numbers, Python has its own inherent object Math. MethodĬonverts a floating-point value to a string.įormatConverts a floating-point value to a string using format specifiers.Ĭonverts the specified string to a floating-point value.Ĭonverts the specified string to an integer value.Ĭonverts the specified string to a long integer value. The objects are available for all supported scripting languages, so you can use them to work with date values regardless of the chosen language. The aqConvert and aqString objects contain several methods that can be helpful when dealing with numerical values. For example, 37e2 is a scientific notation for 3700. In this notation, the exponent symbol "e" means "ten to the power of". Another possible notation for a floating point value is scientific or exponential notation. Generally, the fractional part is separated by the decimal point character. For instance, 0xff is an equivalent to decimal 255 and OX5EA is an equivalent to decimal 1514.įloating-point numbers have a fractional part that can be as small as ±5x10^-324.

The letters from A to F are used to represent numbers from 10 to 15. An integer is treated as hexadecimal if it is prefixed with zero followed by the letter "x" (uppercase or lowercase) and contains digits from 0 to 9 or letters from A to F (uppercase or lowercase). For instance, 061 is an equivalent to decimal 49. Octal and hexadecimal numbers can be negative, but cannot be written in the exponential form or have a fractional part.Īn integer is treated as octal, if it is prefixed with 0o and contains digits from 0 to 7. Generally, an integer number is considered to be in decimal numeration, however the octal or hexadecimal representation is also possible. The TestComplete scripting engine does not distinguish floating-point and integer data types, so a variable can have a value of both types.Īn integer value can accept zero, positive and negative numbers within the range ☑.7976931348623157x10^308. Numeric values can be of integer and floating-point types.
