English

Which data type will be used to represent the following data values and why? Number of months in a year - Computer Science (Python)

Advertisements
Advertisements

Question

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

Number of months in a year

One Line Answer

Solution

The int data type will be used to represent the 'Number of months in a year' as it will be an integer i.e. 12.

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. a) | Page 116
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×