HOTSPOT During school holidays, you volunteer to explain some basic programming concepts to younger siblings.

Last Updated on August 28, 2021 by Admin 2

HOTSPOT

During school holidays, you volunteer to explain some basic programming concepts to younger siblings.
You want to introduce the concept of data types in Python. You create the following three code segments:

98-381 Part 01 Q11 014
98-381 Part 01 Q11 014

You need to evaluate the code segments.

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

NOTE: Each correct selection is worth one point.

98-381 Part 01 Q11 015 Question
98-381 Part 01 Q11 015 Question
98-381 Part 01 Q11 015 Answer
98-381 Part 01 Q11 015 Answer
Explanation:

– Code Segment 1: You cannot convert str to int. x1 = “2” is a string. Therefore code will produce an error.
– Code Segment 2: b = 1.5, which is a float.
– Code Segment 3: c = 2.5, which is a float, not an int.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments