0% found this document useful (0 votes)
9 views

Variables and Data Types

Presentation 2

Uploaded by

sumaiyakorabu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Variables and Data Types

Presentation 2

Uploaded by

sumaiyakorabu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Variables and Data Types

[email protected]
18FLX746J5

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
This file is meant for personal use by [email protected] only.
Sharing or publishing the contents in part or full is liable for legal action.
Agenda
• What is data?
• What is the need of data?
• What is data variable?
• What is data type?
• Various data-types in programming
[email protected]
• Variables in a program
18FLX746J5

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
This file is meant for personal use by [email protected] only.
Sharing or publishing the contents in part or full is liable for legal action.
What is data?
• In computing, the data is the information that a program acts on to process and/or
change data during this process

• Data can be represented in the form of one bit to a complex data structure

• Data is an essential component on which a program acts and produces a


[email protected]
18FLX746J5
knowledgeable output

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
This file is meant for personal use by [email protected] only.
Sharing or publishing the contents in part or full is liable for legal action.
What is the need of data?
• To persist business related information

• To analyse data for better understanding of business metrics and auditing purpose

• Data is important for analysis and useful for extracting the relevant information for
further processing
[email protected]
18FLX746J5

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
This file is meant for personal use by [email protected] only.
Sharing or publishing the contents in part or full is liable for legal action.
What is data variable?
● Data variable is the name given to the memory location for storing data required
for computing algorithms

● Data variable has the associated data type which is responsible for storing certain
kind of data.
For example, in language like C++ / Java, developer has to declare a data type
[email protected]
18FLX746J5
before storing a value. An integer data type can only store integer values, string
data type can store data in string format
In case of Python it is not required to declare the data type of a variable
beforehand

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
This file is meant for personal use by [email protected] only.
Sharing or publishing the contents in part or full is liable for legal action.
What is data type?
• Data Types are the categories of the data of certain kind

• Data Type especially defines the set of operations that can be performed on it

• Common basic data types are :


– Integer
[email protected]
18FLX746J5
– Float
– Character
– String
– Boolean

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
This file is meant for personal use by [email protected] only.
Sharing or publishing the contents in part or full is liable for legal action.
Various data-types in programming
• Integer:
– Data Type used to represent real numbers without any factions
• Example : 1, 2, 4 , 19, 1010

• Float:
– Data type used to represent a number having factions values for more precision
[email protected]
18FLX746J5
of data storing as compared to integers.
• Example : 2.4, 101.67

• Character:
– Characters are simply 8 bits data having the values like A-Z or a-z or 0-9 of
special symbols
• Example: ‘A’, ‘a’, ‘9’, ‘$’
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
This file is meant for personal use by [email protected] only.
Sharing or publishing the contents in part or full is liable for legal action.
Various data-types in programming - continued
• String:
– Sequence of characters is called a String.
• Example : “Programming”

• Boolean:
– Boolean data type has two values associated. True either False
[email protected]
18FLX746J5

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
This file is meant for personal use by [email protected] only.
Sharing or publishing the contents in part or full is liable for legal action.
Variables in a program
• When a program executes, it needs data to work on which is stored in variables
• These variables exists till a program executes
• Data in variables is of two types:
– Persistent data : We read this data from database/files and store in variables
– Non Persistent data : This data is declared within a program and used during
the execution
[email protected]
18FLX746J5
• A program uses both type of data to execute to give desired output

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
This file is meant for personal use by [email protected] only.
Sharing or publishing the contents in part or full is liable for legal action.
Summary
• We learned about what the data is and its types.
• We learned what a data variable is and why we need variables.
• How we use variables in a program?

[email protected]
18FLX746J5

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
This file is meant for personal use by [email protected] only.
Sharing or publishing the contents in part or full is liable for legal action.
[email protected]
18FLX746J5

Thank You

Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
This file is meant for personal use by [email protected] only.
Sharing or publishing the contents in part or full is liable for legal action.

You might also like