0% found this document useful (1 vote)
5K views1 page

Coursera Week 1 Quiz 1

The document contains 4 multiple choice questions that test knowledge of Python data types. Question 1 asks about the type of the literal 1, and the answer is that it is an int type. Question 2 performs type conversion from a float to an int and asks the result type, which is int. Question 3 performs float to int conversion and truncates the decimal, resulting in the answer of 3. Question 4 performs a True to int conversion, which evaluates True to 1.

Uploaded by

Divyanshu Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
5K views1 page

Coursera Week 1 Quiz 1

The document contains 4 multiple choice questions that test knowledge of Python data types. Question 1 asks about the type of the literal 1, and the answer is that it is an int type. Question 2 performs type conversion from a float to an int and asks the result type, which is int. Question 3 performs float to int conversion and truncates the decimal, resulting in the answer of 3. Question 4 performs a True to int conversion, which evaluates True to 1.

Uploaded by

Divyanshu Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

1.

Question 1
what is the type of the following: 1

[Link]

[Link]

[Link]

ans-b

[Link] 2
what is the result of the following code segment: type(int(12.3))

[Link]

[Link]

[Link]

ans-a

[Link] 3
What is the result of the following code segment: int(3.99)

a.3

b.3.99

c.4

ans- a

[Link] 4
What is the result of the following code segment: int(True)

a.1

b.0

[Link]

ans-a

You might also like