예제 #1
0
    print g.vertexWithMostAdj()
    print ""
    print "What else would you like to know?"
    print "0 = artists similar to a given artist"
    print "1 = if an artist is connected to another artist through similar artists"
    print "To exit, type 'exit' at any time"
    
    while True:
        cmnd = raw_input()

        if cmnd == "0":
            cmnd = raw_input("Please specify an artist: ")

            if cmnd in artists:
                print "Similar artists include: "
                sim = g.getAdj(cmnd)
                for s in sim: print s

                print ""
                print "What else would you like to know?"
                print "0 = artists similar to a given artist"
                print "1 = if an artist is connected to another artist through similar artists"
                print "To exit, type 'exit' at any time"               
            else:
                print "I'm sorry, we aren't that hip."
                print "We don't have any information on that artist."
                print "Try another one?"

        elif cmnd == "1":
            cmnd = raw_input("Please specify the first artist: ")
            foo = raw_input("Please specify the second artist: ")