I’m struggling with this problem. I attached 2 solutions that may help, but both codes are incorrect. 1. Please read the instructions carefully. (Ask for a hori, vert, and const as floats) 2. Code must be simple & easy to understand. 3. Attach a picture of your code in one page and 2 example outputs. Thank you for your help.
from turtle import* def main(): hor float(input("horizontal multiplier:")) ver = float(input("vertical multiplier:")) cons = float(input("constant:") wn = Screen() %3D t = Turtle() t.color('yellow) t.pencolor('black') t.speed(100) # tracer(0, 0) for j in range(10): for i in range(8): t.penup() t.goto(25 " j, -25 * i) t.pendown() t.begin_fill) t.circle(hor j+ ver i+ cons) t.end fill) exitonclick() #tupdate() if name =='_main: main() "/>
Extracted text: Anonymous answered this 97 answers Was this answer helpful? import turtle hm,vm.c=map(float,input("Enter Horizontal multiplier, Vertical multiplier and Constart: ".split) t= turtle.Turtle) tfillcolor(yellow) #The color to fill in circle for i in range(1,11): for j in range(1,9): tpu) #penup0 this will do not dram while moving t.setpos(i*25j"-25) #Goto that location on screen tpd0) #pendown) to start dram radius-hm*i+vm*j+c tbegin_fill) #To start filling color t.circle(radius) #To draw a circle tend fill) #To end filling color View comments (2) > from turtle import* def main(): hor float(input("horizontal multiplier:")) ver = float(input("vertical multiplier:")) cons = float(input("constant:") wn = Screen() %3D t = Turtle() t.color('yellow) t.pencolor('black') t.speed(100) # tracer(0, 0) for j in range(10): for i in range(8): t.penup() t.goto(25 " j, -25 * i) t.pendown() t.begin_fill) t.circle(hor j+ ver i+ cons) t.end fill) exitonclick() #tupdate() if name =='_main: main()
Extracted text: This assignment will require you to apply turtle graphics, nested for loops, user input, and simple mathematical calculations all at once. Ask for a horizontal multiplier, a vertical multiplier, and a constant from the user (as floats, or real numbers). For every cell in a 10x8 grid: Move the turtle to position (25 x horiz cell, -25 x vert cell). Draw a circle with radius (horiz mult x horiz cell + vert mult x vert cell + constant). Example output for values (-1, 0.5, 5): Example output for values (1, –2, -5):