0% found this document useful (0 votes)
9 views4 pages

Data Analysis Python Notes

Uploaded by

tandonraveena6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views4 pages

Data Analysis Python Notes

Uploaded by

tandonraveena6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Project: Data Analysis

Language: Python
Tool/Software: IDLE Python

Q1. What is Data?


Ans: Data is a collection of Information gathered through observation, measurement or
questioning. We deal with data every day. It can be in the for of numbers or words.
E.g.: A school teacher handles a large amount of data daily, including student attendance
sheets and report cards.

Q2. What do you mean by information?


Ans: Processed data is called information, which is stored, organised, interpreted, and
represented to make it useful.

Q3. Explain the term Data Analysis.


Ans: The technique of extracting relevant information from a large set of data is known
as Data Analysis.

Q4. What is the use of a Programming language?


Ans: A Programming language allows users to give instructions to a computer in a
language that the computer understands.
Programmers use a programming language to communicate with the computer.
They are used to develop websites, build games, applications and create animations,
scientific research and much more.

Q5. What do you mean by Python Language?


Ans: Python is a general-purpose programming language which is used to develop both
web and desktop applications.
Python is also used to develop more scientific and numeric applications, perform data
analysis and create visualisations.

Q6. Write Applications of Python.


Image
processing
Application
Software 3D CAD
Application Modelling

Web Python Scientific


Application Research
Applications

Artificial
Games
Intelligence
Bussiness
Application
Q7. Explain the features of Python.
Ans: Features of Python are given below:
a. It is an easy-to-learn, general-purpose high-level programming language.
b. It is a platform-independent programming language, which means it can be used on
any machine and in any operating system.
c. It has a simple syntax.
d. Python is a case-sensitive language.
e. It is an interpreted language.
f. It is free to use.

Q8. What are Variables in Python? Also, Explain the rules for writing variable names.
Ans: Variables are used to store data. A variable can store only one data value at a time.
When a new value is stored in a variable, its previous value gets overwritten.
Values are assigned to variables using the assignment operator (=). For example, the
statement x=25 assigns the value 25 to the variable x.
Rules to write variable names:
Certain rules in Python have to be followed to form valid variable names. The rules for a
valid identifier (variable name) are:
• A variable name must start with an alphabet (capital or small) or an underscore ().
• A variable name can consist of letters, digits, and underscore. No other character is
allowed.
• A keyword cannot be used as a variable name.
• A variable name can be of any length.
• Variable names are case-sensitive (e.g., Age and age are different variable names).
Examples of Valid variable names: Class, emp_code, totsalary, minvalue, bal_fee,
age1980, a45r

Q9. What do you mean by data type? Also, explain its type.
Ans: A Data type represents the type of data stored in a variable. The basic data types
used in Python are mentioned here:
1. Integer (int): It represents integer numbers means a number without a decimal point. For
example: 34, 567, 12, 343
2. Decimal(float): It represents numbers with a decimal point. For example: 34.5,1213.7,433.9
3. String (str): It represents alphabets or alphanumeric characters and string values should
always be enclosed within single or double quotation marks (“ “). For example:”abc”, “232”,
”age34”.
Q10. Explain input () function and print () function.
Ans: input () function: it is used to accept the value of a variable from a user. Users can use
int() and float() along with input() function.
Print () function: print() function is used to print a message or value.

Q11. What is the difference between an operator and an operand?


Ans: Operators are the symbols that perform some arithmetic and logical operations on
operands. Operands are the variables on which some operation is performed with the help of
operators.

Program 1: Write a program to add two numbers, and the values of both the
numbers should be entered at the output screen using the input() function.
Ans: a=float(input(“enter value of a:”))
b=float(input(“enter value of a:”))
c=a+b
print(“addition of two numbers is:”,c)

output:
enter value of a:234
enter value of b:345
addition of two numbers is:579

Program 2: Write a program to find the area and perimeter of a rectangle, and the
values of the variables should be entered at the output screen.
Ans: length=float(input(“enter value of length:”))
breadth=float(input(“enter value of breadth:”))
area=length*breadth
print(“area of a rectangle:”, area)
perimeter=2*(length+breadth)
print(“perimeter of a rectangle:”,perimeter)

output:
enter value of length: 20
enter value of breadth: 12
area of a rectangle: 240
perimeter of a rectangle: 64

Program 3: Write a program to find the area of a triangle, and the values of the
variables should be entered at the output screen.
Ans: base=float(input(“enter value of base:”))
height=float(input(“enter value of height:”))
area=0.5*base*height
print(“area of a triangle:”, area)

output:
enter value of base: 5
enter value of height:10
area of a triangle: 25

You might also like