Day -3 learning

1. Numeric Types (int, float, complex)

a) 26-int (numbers)
b) 26.5-float (numbers with decimal)
c) 2+3i complex (real number+ imaginary number)

2. Text Type (strings)
a)””
b)”
c)”””
“””

3. Boolean Type (bool)
a) True
b) False

4. None Type (None)
None means its like nothing there is no value

5. How to check a data type ?

a) identify the data type below methods
E.g.
type(26) result = int
type (26.5) result = float
type (True) result = bool
type(“Chennai”) result= str

6. What is a variable ?
variable is nothing kind of bag here we can save or store or define the object

*7. How to define it *

type variable Name = value;
E.g.
name=chozhan (variable)
city=thanjavur (variable)

8. valid, invalid variables

A variable name cannot start with a number have a space in the name or contain special characters

9. assigning values

10. multiple assignment

in single cell will assign multiple variable
E.g
name,age,city=chozhan,3000,thanjavr

code: print(name,age,city)

result: chozhan,3000,thanjavr

11. unpacking
will update future

12. variable types
will update future

13. Constants
user can defined the value should not be change

e.g.
PI=3.14


Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top
Mobile app development.