Skip to content

Instantly share code, notes, and snippets.

x,y =map(int,input("Enter Two numbers:").split())
#map() is used to make the variable an int
if(x%y)==0:
print('First number is divisible by second')
else:
print('First number is not divisible by second')
days=365
hours=24
minutes=60
seconds=60
print("Number of seconds in a year are:",days*hours*minutes*seconds)
def even_odd(x):
if x%2==0:
return True
else:
return False
a=int(input("Enter any number:"))
even_odd(a)
x=int(input("Enter any number:"))
if x<0:
print('Negative')
elif x==0:
print('Zero')
else:
print('Positive')
plt.plot([140,130,130,190,160,200,150,170,190,170,150,120], label='North')
plt.plot([160,200,130,200,200,170,110,160,130,140,170,200], label= 'South')
plt.plot([140,180,150,170,190,140,170,180,190,150,140,170], label='East')
plt.plot([180,150,200,120,180,140,110,130,150,190,110,140], label='West')
plt.plot([110,160,130,110,120,170,130,200,150,160,170,130], label='Central')
plt.title("Rainfall from Jan to Dec")
plt.xlabel('X-Axis')
plt.ylabel('Y-Axis')
plt.legend()
import pandas as pd
import matplotlib.pyplot as plt
labels=['North', 'South', 'East','West','Central']
sizes =[140, 160,140,180,110]
colors=['gold','yellowgreen','lightcoral','lightskyblue','pink']
explode=(0.1,0,0,0,0)
plt.pie(sizes,explode=explode,
labels=labels,colors=colors,shadow=True, startangle=140, autopct='%1.1f%%')
import pandas as pd
import matplotlib.pyplot as plt
df= pd.read_csv("/est.csv")
print(df)
df.plot.bar()
import pandas as pd
import matplotlib.pyplot as plt
fig=plt.figure()
ax=fig.add_axes([0,0,1,1])
apps=['AngryBird','TeenTitan','MarvelComics',
'ColorMe','FunRun','CrazyTaxi','IgramPro',
import pandas as pd
import matplotlib.pyplot as plt
df= pd.read_csv("/App.csv")
print(df)
x=[75,120,190,245,550,55,175,75,140]
import pandas as pd
import matplotlib.pyplot as plt
# Bar Graph
df= pd.read_csv("Rainfall.csv")
print(df)
df.plot.bar()