Commit 9f275075 by BellCodeEditor

auto save

parent 9d20c1eb
import turtle
import random
turtle.colormode(255)
n = 5
b = 150
turtle.pensize(20)
turtle.color('grey')
turtle.setheading(270)
turtle.bgcolor('palegreen')
turtle.goto(0,0)
def draw_blade(length):
turtle.begin_fill()
for i in range(3):
turtle.forward(length)
turtle.left(120)
turtle.end_fill()
turtle.forward(300)
turtle.backward(300)
for i in range(n):
color = (random.randint(0,255),random.randint(0,255),random.randint(0,255))
turtle.color(color)
draw_blade(b)
turtle.left(360/n)
turtle.done()
import turtle
import random
turtle.colormode(255)
n = 5
b = 150
turtle.pensize(20)
turtle.color('grey')
turtle.setheading(270)
turtle.bgcolor('palegreen')
turtle.goto(0,0)
def draw_blade(length):
turtle.begin_fill()
for i in range(3):
turtle.forward(length)
turtle.left(120)
turtle.end_fill()
turtle.forward(300)
turtle.backward(300)
for i in range(n):
color = (random.randint(0,255),random.randint(0,255),random.randint(0,255))
turtle.color(color)
draw_blade(b)
turtle.left(360/n)
turtle.done()
n=int(input())
n=list(map(int,input().split(" ")))
l=[]
sum=0
for i in n:
for j in range(0,n.index(i)):
if i>n[j]:
sum+=1
l.append(sum)
sum=0
for i in l:
print(i,end=" ")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment