Can you guys help me write a code that will output the shape of an apple using python or java.
4/5/2020 2:04:58 AM
Ryan6 Answers
New Answerimport turtle as t t.setup(800,600,200,200) def draw_shape(sides): t.pensize(3) t.pencolor("black") for i in range(sides): t.right(360/sides) t.fd(200/sides) x = -400 y = 200 for i in range(0,100): t.up() t.goto(x,y) t.down() draw_shape(i) x = x + 80 print(x) if x > 400: x = x - 800 y = y - 100 t.done() Run this code in pydroid 3 app. This will not work in sololearn. As it is not interactive.
Yes sure . Get the app here. https://play.google.com/store/apps/details?id=ru.iiec.pydroid3 get additional file . this will be installed automatically . https://play.google.com/store/apps/details?id=ru.iiec.pydroid3.quickinstallrepo
SoloLearn Inc.
4 Embarcadero Center, Suite 1455Send us a message