Computer Science
What will be returned by Python as result of following statements?
(a) >>> type(0)
(b) >>> type(int(0))
(c) >>>.type(int('0')
(d) >>> type('0')
(e) >>> type(1.0)
(f) >>> type(int(1.0))
(g) >>>type(float(0))
(h) >>> type(float(1.0))
(i) >>> type( 3/2)
Related Questions
Consider the following code :
name = input ("What is your name?") print ('Hi', name, ',') print ("How are you doing?")
was intended to print output as
Hi
, How are you doing ? But it is printing the output as:
Hi
, How are you doing? What could be the problem ? Can you suggest the solution for the same ?
Find the errors in following code fragment :
c = input( "Enter your class" ) print ("Last year you were in class") c - 1
What will be the output produced by following code ?
>>> str(print())+"One"
What will be the output produced by following code ?
>>> str(print("hello"))+"One"