Question: In python every variable has a type, it is very much required that a programmer understands the type of the values stored in a

In python every variable has a type, it is very much required

In python every variable has a type, it is very much required that a programmer understands the type of the values stored in a variable, so that we can use the correct operators. Python automatically infers the type from the value you assign to the variable. Write a python program to find types of the values stored in each of the variables below. 20 Marks 1 2 3 45 6 7 8 9 10 a = False b = 3.7 c='apple' d=7 e = 'True' f = 10 g='110' h='True' i=22/7 j=300 Hint for writing code Type "help", "copyright", "credits" or "li >>> X = 100 >>> print ('Type of x is ', type (x)) Type of x is >>> y = 4.5 >>> type (y) Here type of x is int and type of y is float. (The class word tells that integer is object in python to keep it simple ignore the class concept for now)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!