Загрузка...

Data types in Python | Python Tutorial for Beginners in telugu step by step Part 3

#ottit #pythontutorial
Data types in Python - Basic Data Types in Python | Python Tutorial in Telugu | ottit.net
Python Language fundamentals - Part1

1.Comments

# comment text - single line only

2.Variables

a. Simply place holders(memory area, container ) using which we can store values, later used for processing.

b. While giving variable names follow the below rules

1.Starting letter can be a character or Under Score (_) others not allowed.
2.Name can include Alpha numeric both lower case and upper case, under score (_)
3.Case Sensitive
4.Cannot start with a Number.
5.Identifiers or variable names are unlimited in length.

3.Datatypes - (*Primitive Datatypes - Abstract Datatypes)

No explicit data types
All are implicit data types
Single Value Based
Multiple Values Based (collection)

4.Declaring a variable with and without value

variable = value

a.Without value not possible
b.Must declare with value
c.While assigning values to variables, it's Type is defined.
d.Can change the value
e.Change change the Type
f.Can find the type using type(variable name)

Most recent output is assigned to Under Score _

price = 125
print(price)
type(price) - int

width=88.12
print(width)
type(width) - float

test = 3+5j
print(test)
type(test) - complex

Strings enclosed in single quotes ('...') or double quotes ("...")

name ='Python'
customer_name = 'ottit'
print(name)
type(name) - str
type(customer_name)

local=True
print(local)
type(local) - bool


countries = ["India", "UK", "US", "New Zealand"]
print(countries)
type(countries) - list

currency = ("Indian rupee", "USD", "Pound sterling", "NZ dollar")
print(currency)
type(currency) - tuple

count = range(10)
print(count)
type(count) - range

Customer = {"name" : "Arjun", "age" : 44}
print(Customer)
type(Customer) - dict

states = {"Andhra Pradesh", "Assam", "Arunachal Pradesh"}
print(states)
type(states) - set

capitals = frozenset({"New Delhi", "Wellington", "London"})
print(capitals)
type(capitals) - frozenset

Видео Data types in Python | Python Tutorial for Beginners in telugu step by step Part 3 канала ottit
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять