English

Which data type will be used to represent the following data values and why? A resident of Delhi or not - Computer Science (Python)

Advertisements
Advertisements

Question

Which data type will be used to represent the following data values and why?

A resident of Delhi or not

Short Note

Solution

The boolean data type will be used to represent 'Resident of Delhi or not' as a person will be either a resident of Delhi or not a resident of Delhi. Therefore, the values True or False will be sufficient to represent the values.

shaalaa.com
Python Data Types
  Is there an error in this question or solution?
Chapter 5: Getting Started with Python - Exercise [Page 116]

APPEARS IN

NCERT Computer Science [English] Class 11
Chapter 5 Getting Started with Python
Exercise | Q 6. b) | Page 116
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×