Lab 1-Share
Lab 1-Share
BCS-DS-588
DATA SCIENCE
WITH PYTHON LAB
2
Rashima Mahajan, Professor CSE
List of Practicals:
✓ Anaconda – Runs on Local Server: It comes with a lot of packages by default, so it takes up a lot of space.
Anaconda Repository
Anaconda (or Anaconda Navigator) is an open-source platform that provides data science
toolkits and inbuilt packages for performing various data science tasks.
Here is a code cell with a short Python script that computes a value, stores it in a variable, and
prints the result:
a. Define three variables a, b and c. Assign an value 2 to variable a, value 13.27 to variable b and value 3+2j to variable c.
Print the type of the variables.
# integer variable.
a=2
print("The type of variable having value", a, " is ", type(a))
# float variable.
b=13.27
print("The type of variable having value", b, " is ", type(b))
# complex variable.
c=3+2j
print("The type of variable having value", c, " is ", type(c))
Algorithm:
Step 1: Read radius ‘r’ from user
Step 2: Calculate volume = pi*r*r*r*4/3
Algorithm:
Step 1: Get the Celsius temperature from user
Step 2: Calculate Fahrenheit = (Celsius * 9/5) + 32