Support our Blind Hand Charity by donating at 9818291723. Your contribution has the potential to bring about significant positive change for humanity.

Search This Blog

Thursday, May 25, 2023

POINT PLOTTER

import matplotlib.pyplot as mp
import numpy as np
print("Enter the first coordinate = ")
x1=float(input("Enter X = "))
y1=float(input("Enter Y = "))
print("Enter the second coordinate = ")
x2=float(input("Enter X = "))
y2=float(input("Enter Y = "))
print("Enter the third coordinate = ")
x3=float(input("Enter X = "))
y3=float(input("Enter Y = "))
print("Enter the fourth coordinate = ")
x4=float(input("Enter X = "))
y4=float(input("Enter Y = "))
mp.plot(x1,y1,x2,y2,'o-b')
mp.plot(x2,y2,x3,y3,'o-.r')
mp.plot(x3,y3,x4,y4,'o--c')
mp.plot(x4,y4,x1,y1,'o:y')
mp.show()

OUTPUT