Page 43 - IPP-12-2024
P. 43

print("\n PROGRAM STOPPED")

                               elif x7=="c":

                                   x7="c"

                               else:
                                   print("\n INVALID INPUT")

                           elif bb=="m":

                               x7="c"

                           elif bb=="e":

                               print("\n PROGRAM STOPPED")
                               break

                           else:

                               print("\n INVALID INPUT")

                       elif aa=='l':

                           print("\n Laptops""\n  ")

                           print("\n", df2)

                           cc=input("\n To display graph, Enter 'g' or\n"
                                    "To go to main menu, Enter 'm' or\n"

                                    "To exit the program, Enter 'e’: ")

                           if cc=="g":


               labels=["R15","H450","T800","Y50","R65","H120G","T400R","Y70"]

                               ypos=n.arange(len(labels))
                               size= [342,654,408,322,468,857,436,549]

                               plt.barh(ypos, size, align='center',
               color='r')

                               plt.yticks(ypos, labels)

                               plt.xticks(size)

                               plt.title("Price Comparison of Laptops")
                               plt.xticks(rotation=35, ha='right')

                               plt.xlim(0, max(size)*1.1 )

                               plt.tight_layout(pad=2)
   38   39   40   41   42   43   44   45   46   47   48