# Day 4
# __ _ _ ___ _ _
# / _\(_)_ __ ___ _ __ | | ___ / \___ ___(_)___(_) ___ _ __ /\/\ __ _| | _(_)_ __ __ _
# \ \ | | '_ ` _ \| '_ \| |/ _ \ / /\ / _ \/ __| / __| |/ _ \| '_ \ / \ / _` | |/ / | '_ \ / _` |
# _\ \| | | | | | | |_) | | __/ / /_// __/ (__| \__ \ | (_) | | | | / /\/\ \ (_| | <| | | | | (_| |
# \__/|_|_| |_| |_| .__/|_|\___| /___,' \___|\___|_|___/_|\___/|_| |_| \/ \/\__,_|_|\_\_|_| |_|\__, |
# |_| |___/
# 1
# _,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,_
print("\n1.")
# ask for coordinate values
x = int(input("give me an x: "))
y = int(input("give me a y: "))
# check if it is in any quadrant
if x > 0 and y > 0:
print("\nyour point is in the first quadrant")
elif x < 0 and y > 0:
print("\nyout point is in the second quadrat")
elif x < 0 and y < 0:
print("\nyout point is in the third quadrant")
elif x > 0 and y < 0:
print("\nyour point is in the fourth quadrant")
else: #if its not any, it must be an intercept
print("\nyour point is not in any quadrant (its an intercept!)")
# 2
# _,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,_
print("\n\n2.")
# ask for the type of shape
shape = input("select a shape\n(s) Square\n(r) Rectangle\n(c) Circle\n(t) Triangle\n\n:")
# give area coresponding to the shape
if shape.casefold() == "s" or shape.casefold() == "square":
squareside = int(input("give me the side length: "))
print("the area is", squareside*squareside)
elif shape.casefold() == "r" or shape.casefold() == "rectangle":
rectangleheight = int(input("give me the height: "))
rectanglewidth = int(input("give me the width: "))
print("the area is", rectangleheight*rectanglewidth)
elif shape.casefold() == "c" or shape.casefold() == "circle":
radius = int(input("give me a radius: "))
print("the area is", 3.14159*radius*radius)
elif shape.casefold() == "t" or shape.casefold() == "triangle":
triangleheight = int(input("give me a height: "))
trianglebase = int(input("give me a width: "))
print("the area is", (trianglebase*triangleheight)/2)
else:
print("thats not one of the shapes!")
# 3
# _,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,_
print("\n\n3.")
# ask for years and salary
years = int(input("how many years have you been at the company: "))
salary = int(input("what is your salary: "))
# calculate bonus
bonus = salary*0.05
# check if years exceeds 5, apply bonus
if years > 5:
print("your net bonus is", bonus, "and your gross salary is", bonus+salary)
else:
print("your salary will stay the same")
# 4
# _,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,__,.-'~'-.,_
print("\n\n4.")
# ask for coefficients
a = int(input("give me the Coefficient for x^2: "))
b = int(input("give me the Coefficient for x: "))
c = int(input("give me another number: "))
# write quadratic formula
result1 = ((-1)*b + (b*b-4*a*c)**0.5)/(2a)
result2 = ((-1)*b - (b*b-4*a*c)**0.5)/(2*a)
print("the factors are", (-1)*result1,"and", (-1)*result2)