Tuesday, April 28, 2020


# # csv file loaded


import matplotlib.pyplot as plt
import csv

x = []
y = []
with open('example.txt', 'r') as csvfile:
    plots = csv.reader(csvfile, delimiter = ',')
    for row in plots:
        x.append((row[0]))
        y.append((row[1]))

plt.plot(x,y, label = 'Loaded file...!!!')
plt.xlabel('x')
plt.ylabel('y')
plt.title('Graph')
plt.legend()
plt.show()


Monday, April 27, 2020


# # Pir Graph

# import matplotlib.pyplot as plt


days = [1,2,3,4,5]

sleeping = [2,4,6,8,10]
eating = [1,3,2,3,2]
working = [8,7,6,8,6]
playing = [2,4,3,2,4]

slices = [6,8,6,4]
activities = ['sleeping', 'eating', 'working', 'playing']
cols = ['c', 'm','r','k']

plt.pie(slices, labels = activities, colors = cols, startangle = 90, shadow = True, explode = (0, 0.1,0,0), autopct = '%1.1f%%')

plt.xlabel("x")
plt.ylabel("y")
plt.title("Pie Graph")
plt.legend()
plt.show()

Friday, April 24, 2020


# # Scatter Graph


import matplotlib.pyplot as plt

x = [1,2,3,4,5,6,7,8]
y = [5,2,4,2,1,4,5,2]

plt.scatter(x, y, label='skitscat', s=200, color='y', marker='*')

plt.xlabel('x')
plt.ylabel('y')
plt.title("Scatter Graph")


plt.show()

Tuesday, April 21, 2020


# # Bar Graph part 2
import matplotlib.pyplot as plt


ages = [10,13,14,12,55,44,33,22,66,23,45,67,87,65,43,21,77,88,20,43,50,39,56,76,89,70,60,50,40,90]

ids =  [x for x in range(len(ages))]
plt.bar(ages,ids)

plt.xlabel("x")
plt.ylabel("y")
plt.title("Bar Graph")
plt.show()


# In[ ]:




Thursday, April 16, 2020

#!/usr/bin/env python
# coding: utf-8

# # Lce 1


# In[1]:


import matplotlib.pyplot as plt


# In[12]:


x = [33,44,55]
y = [55,66,77]

x2 = [77,88,99]
y2 = [86,85,83]

plt.legend()
plt.show()

#!/usr/bin/env python
# coding: utf-8

# # Lce 2


# In[1]:


import matplotlib.pyplot as plt


# In[12]:


x = [33,44,55]
y = [55,66,77]

x2 = [77,88,99]
y2 = [86,85,83]

plt.plot(x, y, label="First Line")
plt.plot(x2, y2, label="Second line")
plt.xlabel("important line")
plt.ylabel("graph var")
plt.title("interesting graph\ncheck it out")
plt.legend()
plt.show()

A general description of Python

 Python is a high-level general purpose programming language:
Because code is automatically compiled to byte code and executed, Python is  suitable for use as a scripting language, Web application implementation  language, etc. 
Because Python can be extended in C and C++, Python can provide the speed  needed for even compute intensive tasks. 
Because of its strong structuring constructs (nested code blocks, functions,  classes, modules, and packages) and its consistent use of objects and  object­oriented programming, Python enables us to write clear, logical  applications for small and large tasks. Important features of Python: 
Built­in high level data types: strings, lists, dictionaries, etc.
The usual control structures: if, if­else, if­elif­else, while, plus a powerful  collection iterator (for).
Multiple levels of organizational structure: functions, classes, modules, and  packages. These assist in organizing code. An excellent and large example is the  Python standard library.
Compile on the fly to byte code ­­ Source code is compiled to byte code without a separate compile step. Source code modules can also be "recompiled" to byte  code files.
Objectiveness ­­ Python provides a consistent way to use objects: everything is  an object. And, in Python it is easy to implement new object types (called classes  in object­oriented programming).
Extensions in C and C++ ­­ Extension modules and extension types can be written by hand. There are also tools that help with this, for example, SWIG, sip, Pyrex.
Jython is a version of Python that "plays well with" Java. See: The Jython Project  ­­ http://www.jython.org/Project/.