Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
Give the type (int, float, str or bool) of each value: 7, 7.0, "7", True, 3 > 2.
The type depends on how the value is written.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, compare your working with the solution.
7 is a whole number: int.7.0 has a decimal point: float."7" is in quotation marks: str.True is a truth value: bool.3 > 2 is a comparison. Its result is True, so it is a bool.Answer: int, float, str, bool, bool.
Log in to join the discussion.
Loading…