Computer Science, asked by tarush2509, 2 days ago

if x=3.123 then int(x) will give?

Answers

Answered by BrainlyYoda
0

If x = 3.123 then int(x) will give 3

Extra Information:

The variable 'x' has a decimal value or you can say it's a float value stored in it.

float() function converts the number mentioned to a decimal number or a floating number

int() function converts the number mentioned to an integer number

Example

If x = 5.18 then int(x) will give 5

If x = 3 then int(x) will give 3.0

If x = 5.18 then float(x) will give 5.18

Python is created by Guido van Rossum and came into existence in 1991. It is a high-level and general programming language. It is a very lucid programming language as it has a good language construct and object-oriented approach. It is dynamically typed and garbage-collected.

Similar questions