Finally, we have converted the float value to the integer value in the next line and printed the same. In the next line, we have printed the float value of c using the float() function. In the next line, we have added both a and b assigned the variable to another variable c. In the above example, we have assigned two values of 5.3 and 3.2 to a and b, respectively. In the next example, we will see how to add two float values and convert them into an integer value. In the next line, we have converted the value to an integer value using the int() function and printed the integer value. In the next line, we have printed the value of x, which is a floating-point number. In the above code, we have declared the value as 10/3 to the variable x.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |