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
6
Answer:
How do you create a variable with the floating number 2.8?
➡️ b) x = float(2.8)
Answered by
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
English,
4 months ago
English,
4 months ago
Social Sciences,
4 months ago
Geography,
9 months ago
English,
11 months ago
Social Sciences,
11 months ago