Computer Science
Differentiate between (555/222)**2 and (555.0/222)**2.
Python Data Handling
29 Likes
Answer
In the first expression, 555 is of int type whereas in the second expression 555.0 is of float type.
Answered By
17 Likes
Related Questions
What will the result given by the following?
(a) type (6 + 3)
(b) type (6 -3)
(c) type (6 *3)
(d) type (6 / 3)
(e) type (6 // 3)
(f) type (6 % 3)
Given three Boolean variables a, b, c as : a = False, b = True, c = False. Evaluate the following Boolean expressions:
(a) b and c
(b) b or c
(c) not a and b
(d) (a and b) or not c
(e) not b and not (a or c)
(f) not ((not b or not a) and c) or a
What would following code fragments result in? Given x = 3.
(a) 1 < x
(b) x >= 4
(c) x == 3
(d) x == 3.0
(e) "Hello" == "Hello"
(f) "Hello" > "hello"
(g) 4/2 == 2.0
(h) 4/2 == 2
(i) x < 7 and 4 > 5.
What are augmented assignment operators? How are they useful?