+ 1
Apple shape
Can you guys help me write a code that will output the shape of an apple using python or java.
6 ответов
+ 3
https://docs.python.org/3/library/turtle.html
Go through this .
+ 3
That's all about python only import the turtle class .
+ 3
import 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.
+ 1
there is no python code in that....
+ 1
ive never heard of pydroid 3 app. im newer to coding. does it work on iphone?
+ 1
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