Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started