Question: I wrote this code with Pycharm, there are some bugs, can someone help me correct it? elif shape == e or shape == ellipsoid: x
I wrote this code with Pycharm, there are some bugs, can someone help me correct it?


elif shape == "e" or shape == "ellipsoid": x = float(input("Please enter the radius x: ")) y = float(input("Please enter the radius y: ")) z = float(input("Please enter the radius z: ")) ellipsoidlist.append(volumes.volumeEllipsoid(x,y,z)) elif shape == "q" or shape == "quit": break else: print("Invalid input") print("You have reached the end of your session. The volumes calculated for each shape are:") if len(cubelist) == 0: print("Cube: No shapes entered") else: sumcube = sum(cube list) maxcube = max(cubelist) mincube = min(cubelist) print("Cube: ", sumcube, maxcube, mincube) if len(ellipsoidlist) == 0: print("Ellipsoid: No shapes entered") Felse: sumellipsoid = sum(ellipsoidlist) maxellipsoid = max(ellipsoidlist) minellipsoid = min(ellipsoidlist) print("Ellipsoid: ", sumellipsoid, maxellipsoid, minellipsoid) Run: A H ICE D1- * main Please enter the radius z: 3 Please enter a shape: 9 You have reached the end of your session. The volumes calculated for each shape are: Cube: No shapes entered Traceback (most recent call last): File "/Users/liuyunqing/Documents/main.py", line 45, in
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
