# William T. Verts - Lab #3 - Fish Tank import random,time def INT(N): return int(round(N)) def Circles(Canvas,Xc,Yc,R,FillColor=white,EdgeColor=black): Diameter = INT(2*R) addOvalFilled(Canvas,INT(Xc-R),INT(Yc-R),Diameter,Diameter,FillColor) addOval (Canvas,INT(Xc-R),INT(Yc-R),Diameter,Diameter,EdgeColor) return def Ellipses(Canvas,Xc,Yc,Xr,Yr,FillColor=white,EdgeColor=black): addOvalFilled(Canvas,INT(Xc-Xr),INT(Yc-Yr),INT(2*Xr),INT(2*Yr),FillColor) addOval (Canvas,INT(Xc-Xr),INT(Yc-Yr),INT(2*Xr),INT(2*Yr),EdgeColor) return def Line (Canvas,X1,Y1,X2,Y2,NewColor=black): addLine(Canvas, INT(X1), INT(Y1), INT(X2), INT(Y2), NewColor) return def Fish (Canvas,Xc,Yc,NewColor,Scale=1.0): # FishLeft:Scale<0 FishRight:Scale>0 def F(N): return N*Scale def S(N): return N*abs(Scale) Ellipses(Canvas,Xc-F(14),Yc, S(3), S(14), white, black) # Tail Ellipses(Canvas,Xc, Yc, S(17), S(9),NewColor,black) # Body Circles (Canvas,Xc+F(10),Yc-S(2),S(3), white, black) # Eye Line (Canvas,Xc+F(15),Yc+S(4),Xc+F(7),Yc+S(4),white) # Mouth Line (Canvas,Xc+F(5), Yc+S(6),Xc+F(5),Yc-S(6),white) # Gill return def FishTank(Canvas, TotalFish=20): # All of your code goes here return def Main(): TotalFish = requestIntegerInRange("Enter Number of Fish", 1, 1000) FishTank(makeEmptyPicture(640,480), TotalFish) return