Built in Data types

Built in Data types


When we create a program, we often like to store values so that it can be used later. We use objects to capture data, which then can be manipulated by computer to provide information. By now we know that object/ variable is a name which refers to a value. 

Every object has:

A. An Identity, - can be known using id (object)

B. A type – can be checked using type (object) and

C. A value

Let us study all these in detail

A. Identity of the object: It is the object's address in memory and does not change once it has been created.(We would be referring to objects as variable for now)

B. Type (i.e data type): It is a set of values, and the allowable operations on those values. It can be one of the following:


Qus. 1 : Which of these in not a core data type?

  1. Lists
  2. Dictionary
  3. Tuples
  4. Class
Qus. 2 : Given a function that does not return any value, What value is thrown by default when executed in shell.

  1. int
  2. bool
  3. void
  4. None
Qus. 3 : Which of the following will run without errors?

  1. round(45.8)
  2. round(6352.898,2,5)
  3. round()
  4. round(7463.123,2,1)
Qus. 4 : What is the return type of function id?

  1. int
  2. float
  3. bool
  4. dict
Qus. 5 : In order to store values in terms of key and value we use what core data type.

  1. list
  2. tuple
  3. class
  4. dictionary
Qus. 6 : Raw data assigned to a variable is called as

  1. Variable
  2. Literals
  3. Identifiers
  4. Comment
Qus. 7 : Which one of the following is not a python's predefined data type?

  1. Class
  2. List
  3. Dictionary
  4. Tuple
Qus. 8 : Which can contain multiple lines of text.

  1. Docstring
  2. Python Package Index
  3. both a & b
  4. none of the mentioned

Programs

python program to input a welcome message and print it

View Solution


python program to print number of seconds in year

View Solution


Python program to calculate GST Goods and Service Tax

View Solution


python program to find the ASCII Value of entered character

View Solution


python program that display a joke but display the punch line only when the user presses enter key

View Solution


python program to generate the following output 5 10 9

View Solution


python program to print 5@10@9

View Solution


CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad