1.1 Introduction , Variables,Data Types
1.1 Introduction , Variables,Data Types
What is Python?
Features of Python:
Getting Started:
Running Code: You can run code in an interactive shell, script files,
or integrated development environments (IDEs) like PyCharm, VS
Code, etc.
Variables in Python
What is a Variable?
Naming Conventions:
Variable names are case-sensitive (e.g., age and Age are different).
Example:
python
name = "Alice"
age = 25
is_student = True
A data type specifies the type of data that a variable can hold. has
various built-in data types that cater to different kinds of values.
1. Numeric Types:
2. String Type:
3. Boolean Type:
4. Sequence Types:
5. Mapping Type:
6. Set Types:
o set: Represents an unordered collection of unique items,
e.g.,unique_numbers = {1, 2, 3, 4, 5}
Type Conversion:
x = 10
y = 5.5
x = "10"
converted_x = int(x)