6d5 < import os 9,10d7 < #import plotly.express as px < from PIL import Image 14,20c11,15 < < if len(nums) <= 0: < while sofar < 100: < print(f"Enter your percentage value regarding a pie chart where so far {sofar} has already been allocated.") < anum = input() < nums.append(int(anum)) < sofar += int(anum) --- > while sofar < 100: > print(f"Enter your percentage value regarding a pie chart where so far {sofar} has already been allocated.") > anum = input() > nums.append(int(anum)) > sofar += int(anum) 24,37c19,20 < fig, ax = plt.subplots() < < ax.pie(y) < < fig.savefig("plot.png") < < # Open the PNG image file < with Image.open("plot.png") as img: < # Display the image using your system's default viewer < img.show() < < # Optional: Load the data into memory so you can safely close the file < img.load() < --- > plt.pie(y) > plt.show()