Ask for a horizontal multiplier, a vertical multiplier, and a constant from the user 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 ver Example output for values (-1,0.5, 5):

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
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.
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()
Transcribed Image 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()
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):
Transcribed Image 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):
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY