Computer Applications
What kind of program elements are these: 'a', 4.38925, "a", main( ) ?
Python Funda
1 Like
Answer
| 'a' | String Literal |
| 4.38925 | Floating point Literal |
| "a" | String Literal |
| main( ) | Function |
Answered By
3 Likes
Related Questions
What is meant by a floating-point literal in Python ? How many ways can a floating literal be represented into ?
What are the two Boolean literals in Python ?
Aashna has written following code :
a = 5 b = '5' c = "5" d = 5.0(a) What are the data types of a, b, c, d ?
(b) Are a, b, c, d storing exactly the same values ? Why/why not ?
(c) What will be the output of following code based on values of a, b, c and d ?
print a == b
print b == c
print a == d
(d) Discuss the reasons behind the output of part (c).
Anant has written following expressions in Python 2.7 :
a = - 4 % 1.5 b = - 4 // 1.5 c = 4.0 / 5 d = 4 / 5(a) Find out the values stored by a, b, c and d.
(b) What are the datatypes of a, b, c and d ?
(c) Why are the values of c and d not the same.