#1 - 3
user_age = 26
user_height = 1.80
complex_number = 5 + 2j
#4
triangle_base = int(input("Base of Triangle:"))
triangle_height = int(input("Height of Triangle:"))
#5
print("The Area of the triangle is:", triangle_base * triangle_height * 0.5)
triangle_side_a = int(input("Triangle side a:"))
triangle_side_b = int(input("Triangle side b:"))
triangle_side_c = int(input("Triangle side c:"))
triangle_perimeter = triangle_side_a + triangle_side_b + triangle_side_c
#6
print("Triangle Perimeter is:", triangle_perimeter)
rectangle_length = int(input("Rectangle length:"))
rectangle_width = int(input("Rectangle Width:"))
rectangle_area = rectangle_length * rectangle_width
rectangle_perimeter = rectangle_length + rectangle_width * 2
print("Rectangle Perimeter is:", rectangle_perimeter)
print("Rectangle Area is:", rectangle_area)
#7
circle_radius = int(input("Enter Circle radius:"))
circle_area = 3.14 * circle_radius ** 2
circle_circumference = 3.14 * circle_radius * 2
print("Cirlce Area is:", circle_area)
print("Circle Circumference is:", circle_circumference)
#8
slope1 = 2
xintercept1 = 1
yintercept1 = -2
print("Slope1:", slope1)
print("x intercept", xintercept1)
print("y intercept", yintercept1)
x1, y1, x2, y2 = 2, 2, 6, 10
#9
slope2 = (y2 - y1) / (x2 - x1)
euclidean_distance = ((x2 - x1) 2) + ((y2 - y1) 2) * 0.5
print("Slope2:", slope2)
print("Euclidean Distance:", euclidean_distance)
#10
print("Are slope1 and slope2 the same?:", slope1 == slope2)
#11
x = -3
print("Y=", x ** 2 + 6 * x + 9)
#12
print(len("python") != len("dragon"))
#13
print("on" in "python" and "on" in "dragon")
#14
print("jargon" in "I hope this course is not full of jargon")
# 5
print("on" not in "python" and "on" not in "dragon")
#16
python_length = len("python")
python_length_float = float(python_length)
python_length_str = str(python_length_float)
print("Python Length in int, float, string:", python_length, python_length_float, python_length_str)
#17
even_check = int(input("Number to check if even:"))
print("Number is even:", 0 == even_check % 2)
#18
print(7 // 3 == int(2.7))
#19
print(type("10") == type(10))
#20
print(int(float("9.8") == 10))
#21
print("Your Weekly pay is:",
int(input("hours of work:")) * int(input("rate per hour:")), "€")
#22
print("You have lived for",
int(input("How many years have you lived?")) * 365 * 24 * 60 * 60, "seconds")
#23
????
This is my code for day3 as of now and I really have no clue for #23