GE8151-Unit II- Values and Types

7 flashcards · Programming Languages · by joelanandraj

  1. Define Value.

    A value is one of the basic things a program works with, like a letter or a number. Example : 2, 42.0, and 'Hello, World!'

  2. What is data type ?

    A data type specifies the nature of a data. Integers belong to the type int, strings belong to str, and floating point numbers belong to float.

  3. What are the datatypes available in python ?

    Some of the most frequently used datatypes are int float str Boolean list tuple Dictionary

  4. Is there a limit for how large an integer value has to be ?

    There is no limit to how long an integer value can be. Of course, it is constrained by the amount of memory your system has but beyond that an integer can be as long as you need it to be.

  5. Define String.

    Strings are sequences of character data. The string type in Python is called str. String literals may be delimited using either single or double quotes.

  6. What is Boolean Type

    Python provides a Boolean data type. Objects of Boolean type may have one of two values, True or False.

  7. Define List

    A list is a collection which is ordered and changeable. In Python lists are written with square brackets.