मराठी
तामिळनाडू बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान इयत्ता १२

What is the use of the type() function in python? - Computer Science

Advertisements
Advertisements

प्रश्न

What is the use of the type() function in python?

पर्याय

  • To create a Tuple.

  • To know the type of an element in the tuple.

  • To know the data type of python object.

  • To create a list.

MCQ
Advertisements

उत्तर

To know the data type of python object.

shaalaa.com
Concepts of Tuples in Python
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 9: Lists, Tuples, Sets and Dictionary - Evaluation [पृष्ठ १६८]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 12 TN Board
पाठ 9 Lists, Tuples, Sets and Dictionary
Evaluation | Q 8. | पृष्ठ १६८

संबंधित प्रश्‍न

Write the syntax of creating a Tuple with n number of elements.


What is a nested tuple? Explain with an example.


“Lists and Tuples are ordered”. Explain.


What advantages do tuples have over lists?


When to use a tuple or dictionary in Python. Give some examples of programming situations mentioning their usefulness.


Prove with the help of an example that the variable is rebuilt in case of immutable data types.


TypeError occurs while statement 2 is running. Give reason. How can it be corrected?

>>> tuple1 = (5)         #statement 1
 >>> len(tuple1)         #statement 2

Write a program to read the email IDs of n number of students and store them in a tuple. Create two new tuples, one to store only the usernames from the email IDs and the second to store domain names from the email IDs. Print all three tuples at the end of the program. [Hint: You may use the function split()]


Write a program to input the names of n students and store them in a tuple. Also, input a name from the user and find if this student is present in the tuple or not. We can accomplish these by:

writing a user-defined function


Participating in a quiz can be fun as it provides a competitive element. Some educational institutes use it as a tool to measure the knowledge level, abilities, and/or skills of their pupils either on a general level or in a specific field of study. Identify and analyze popular quiz shows and write a Python program to create a quiz that should also contain the following functionalities besides the one identified by you as a result of your analysis.

  • Create an administrative user ID and password to categorically add, modify, or delete a question.
  • Register the student before allowing her or him to play a quiz.
  • Allow selection of category based on the subject area.
  • Display questions as per the chosen category.
  • Keep the score as the participant plays.
  • Display the final score.

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×