Computer Science, asked by queensp73, 9 months ago

How do you create a variable with the floating number 2.8?

a)Both the other answers are correct
b)x = float(2.8)
c)x = 2.8

Answers

Answered by Anonymous
6

Answer:

How do you create a variable with the floating number 2.8?

➡️ b) x = float(2.8)

Answered by SaurabhJacob
2

For Python-like programming languages,

c) x = 2.8  is the correct option.

In these languages, the interpreter does not follow strict datatype rules. So the variables are first initialized with the value and then the interpreter determines the data type automatically.

But, For the other programming languages,

None of the options are correct.

Since these programming languages support strict datatypes rules. So the variables are declared with their data type first and then it is used to operate in the program.

Similar questions