import turtle
import math
import time
r = eval(input('Enter the length from the center to a vertex:'))
s = 2 * r * math.sin(math.pi / 5)
area = 5 * s * s / (4 * math.tan(math.pi / 5))
print(f'The area of the pentagon is {area:.2f}')
x1, y1 = eval(input('Enter point1 (latitude and longtitude) in degrees:'))
x2, y2 = eval(input('Enter point2 (latitude and longtitude) in degrees:'))
x1, y1, x2, y2 = math.radians(x1), math.radians(y1), math.radians(x2), math.radians(y2)
radius = 6371.01
d = radius * math.acos(math.sin(x1) * math.sin(x2) + math.cos(x1) * math.cos(x2) * math.cos(y1 - y2))
print(f'The distance between two points is {d} km')
s = eval(input('Enter the side:'))
area = (5 * s ** 2) / (4 * math.tan(math.pi / 5))
print(f'The area of the pentagon is {area}')
numberOfSides = eval(input('Enter the number of sides:'))
side = eval(input('Enter the side:'))
areaOfPolygon = (numberOfSides * side ** 2) / (4 * math.tan(math.pi / numberOfSides))
print(f'The area of the polygon is {areaOfPolygon}')
asiiCode = eval(input('Enter an ASCII code:'))
char = chr(asiiCode)
print(f'The Character is {char}')
amount = input('Enter an amount, for example, 1156:')
dollar = eval(amount[:-2])
cent = eval(amount[-2:])
quarter = cent // 25
remain = cent % 25
dime = remain // 10
remain = remain % 10
nickel = remain // 5
penny = remain % 5
print(f"Your amount {amount} consists of\n"
f"\t{dollar} dollars\n"
f"\t{quarter} quarters\n"
f"\t{dime} dimes\n"
f"\t{nickel} nickels\n"
f"\t{penny} pennies")
employee_name = input('Enter employee\'s name:')
hours_work = eval(input('Enter number of hours worked in a week:'))
pay_rate = eval(input('Enter hourly pay rate:'))
federal_tax_wh = eval(input("Enter federal tax withholding rate:"))
stats_tax_wh = eval(input("Enter state tax withholding rate:"))
gross_pay = hours_work * pay_rate
federal_wh = gross_pay * federal_tax_wh
states_wh = gross_pay * stats_tax_wh
print(f'Employee Name: {employee_name}\n'
f'Hours Work: {hours_work:.1f}\n'
f'Pay rate: ${pay_rate:.2f}\n'
f'Gross Pay: ${gross_pay:.1f}\n'
f'Deduction:\n'
f'\tFederal Withholding(20%): ${federal_wh:.1f}\n'
f'\tState Withholding(9.0%): ${states_wh:.2f}\n'
f'\tTotal Deduction: ${federal_wh + states_wh:.2f}\n'
f'Net Pay: ${gross_pay - (federal_wh + states_wh):.2f}')
greece = '\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8'
turtle.pensize()
turtle.write(greece, font=('Times', 20))
turtle.done()
integer = input('Enter an integer:')
reversed_integer = integer[::-1]
print(f'The reversed number is {reversed_integer}')
sides = eval(input('Enter the side:'))
i = 0
while i <= 5:
turtle.forward(100)
turtle.right(144)
i += 1
turtle.done()
turtle.begin_fill()
turtle.fillcolor('red')
turtle.left(60)
i = 0
while i < 6:
turtle.forward(100)
turtle.right(60)
i += 1
turtle.end_fill()
turtle.right(60)
turtle.penup()
turtle.forward(100)
turtle.goto(100, -100 * math.sin(math.pi * 2 / 3) / 2)
turtle.pendown()
turtle.pencolor('white')
turtle.write('STOP', align='center', font=('Arial', 50, 'bold'))
turtle.done()
radius = eval(input('Enter the radius:'))
def oneLoop(r, color):
turtle.pensize(6)
turtle.color(color)
turtle.circle(r)
def fiveCircle(r):
turtle.penup()
turtle.goto(r * 2 * -1 + r / 5 * -1, 0)
turtle.pendown()
oneLoop(r, "blue")
turtle.penup()
turtle.goto(0, 0)
turtle.pendown()
oneLoop(r, "black")
turtle.penup()
turtle.goto(r * 2 + r / 5, 0)
turtle.pendown()
oneLoop(r, "red")
turtle.penup()
turtle.goto((r + r / 10) * -1, r * -1)
turtle.pendown()
oneLoop(r, "yellow")
turtle.penup()
turtle.goto((r + r / 10), r * -1)
turtle.pendown()
oneLoop(r, "green")
turtle.done()
fiveCircle(radius)
turtle.penup()
turtle.goto(0, -50)
turtle.pendown()
turtle.circle(100)