Write a program that uses Prim's algorithm to find a minimal spanning tree for a weighted simple connected undirected graph. Input will be a list of edges and weights (prompt the user to enter these); output will be the edges in the order chosen and the total weight of the spanning tree. Test your program on the following test cases: (The first two numbers in each triple represent the vertices connected by the edge, and the third number is the weight of the edge).
NOTE: the output for this input should look like:
Edges: (6,7), (6,5), (6,2), (2,3), (2,1), (1,4)
Total weight of this spanning tree is 23.