Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save AspirantDrago/04f1078f13dc375e5d8227f4ce2bbb55 to your computer and use it in GitHub Desktop.

Select an option

Save AspirantDrago/04f1078f13dc375e5d8227f4ce2bbb55 to your computer and use it in GitHub Desktop.
import math
RADIUS = 100
def polygon(n):
result = []
for i in range(n):
angle = 2 * math.pi * i / n
x = math.cos(angle) * RADIUS
y = math.sin(angle) * RADIUS
result.append((
int(round(x)),
int(round(y))
))
return result
def start1():
n = int(input())
points = polygon(n)
for x, y in points:
print(x, y)
def start2():
n2 = int(input())
points2 = [
list(map(float, input().split()))
for _ in range(n2)
]
if n2 >= 12:
print(20)
else:
print(10)
def main():
s = input()
t = int(input())
for _ in range(t):
if s == 'draw':
start1()
else:
start2()
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment