Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Python programming - Data types, variables, identifiers

Rating
-
Sold
-
Pages
3
Uploaded on
21-09-2023
Written in
2023/2024

Python programming - data types, variables, identifiers

Institution
Course

Content preview

DATATYPES , VARIABLES & IDENTIFIERS - PYTHON PROGRAMMING

Variables and Identifiers
A variable is an alternate name given to some memory locations.
It allows us to store and manipulate data in our programs. In
Python, we can assign values to variables and update them as
needed. An identifier, on the other hand, is used to identify
elements such as variables, classes, functions, etc. We give
names to these elements so that we can easily identify and work
with them.

Rules for Naming Variables and Identifiers


 The name should not match any Python keyword.

 The name can consist of alphabets or numerals.

 The name should start with a character or an
underscore.

 The name can be alphanumeric, but it should start
with a character or an underscore.

 The name is case-sensitive, so "name" and "Name"
are considered different variables.
Data Types
In Python, we have different data types to represent different
kinds of values. The two main categories are numbers and
strings.

Numbers

Numbers can be integers, floating-point numbers, or complex
numbers. In Python, we can assign values to variables without
explicitly declaring their data types. For example, j = 5 assigns
the value 5 to the variable j, which is automatically considered
an integer. We can perform arithmetic operations on these
numbers just like in other programming languages.

Written for

Course

Document information

Uploaded on
September 21, 2023
Number of pages
3
Written in
2023/2024
Type
Class notes
Professor(s)
Krishna chandar
Contains
All classes

Subjects

$6.09
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
anandamahalingam

Get to know the seller

Seller avatar
anandamahalingam Udemy
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions