Question: is this all correct, is it this way I'm supposed to send it to the teacher: import cmath import math celsius = float(input(Enter temperature in
is this all correct, is it this way I'm supposed to send it to the teacher: import cmath import math celsius = float(input("Enter temperature in Celsius: ")) fahrenheit = celsius * (9/5) + 32 kelvin = celsius + 273.15 print(f"Temperature in Fahrenheit: {fahrenheit}") print(f"Temperature in Kelvin: {kelvin}") a = float(input("Enter coefficient a: ")) b = float(input("Enter coefficient b: ")) c = float(input("Enter coefficient c: ")) discriminant = b**2 - 4*a*c root1 = (-b + cmath.sqrt(discriminant)) / (2*a) root2 = (-b - cmath.sqrt(discriminant)) / (2*a) print(f"The roots are {root1} and {root2}") a = float(input("Enter the first side length: ")) b = float(input("Enter the second side length: ")) c = float(input("Enter the third side length: ")) print(a + b > c and a + c > b and b + c > a) a = float(input("Enter the side length of the pentagon: ")) area = (1/4) * math.sqrt(5 * (5 + 2 * math.sqrt(5))) * a**2 print("The area of the pentagon is:", area) n = int(input("Enter the Fibonacci sequence number: ")) phi = (1 + math.sqrt(5)) / 2 fibonacci_number = round((phi**n - (1 - phi)**n) / math.sqrt(5)) print("The", n, "th Fibonacci number is:", fibonacci_number)
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
