Write a Python program to enter any number and calculate its square root.
Write a Python program to enter any number and calculate its square root. PROGRAM https://youtu.be/V2YVAR9nDj8?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU import math # Input from the usernum = float(input(“Enter any number: “)) # Check if the number is non-negativeif num >= 0:sqrt = math.sqrt(num)print(f”The square root of {num} is: {sqrt}”)else:print(“Square root of negative number is not defined in real numbers.”) […]
Write a Python program to find power of any number x ^ y.
Write a Python program to find power of any number x ^ y. PROGRAM https://youtu.be/V2YVAR9nDj8?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU # Python program to find power of any number (x ^ y) # Input from the userx = float(input(“Enter the base number (x): “))y = float(input(“Enter the exponent (y): “)) # Calculate powerresult = x ** y # Display the […]
Write a Python program to convert days into years, weeks and days.
Write a Python program to convert days into years, weeks and days. PROGRAM https://youtu.be/nBezzJDpVlY?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU # Python program to convert days into years, weeks, and days # Input: Total number of daystotal_days = int(input(“Enter total number of days: “)) # Calculate years, weeks, and remaining daysyears = total_days // 365remaining_days = total_days % 365 weeks = […]
Write a Python program to enter temperature in Fahrenheit and convert to Celsius
Write a Python program to enter temperature in Fahrenheit and convert to Celsius PROGRAM https://youtu.be/zNSYG7O6IuM?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU # Python program to convert Fahrenheit to Celsius # Input: Temperature in Fahrenheitfahrenheit = float(input(“Enter temperature in Fahrenheit: “)) # Convert to Celsiuscelsius = (fahrenheit – 32) * 5/9 # Output the resultprint(“Temperature in Celsius:”, celsius) OUTPUT TRY THE ABOVE […]
Write a Python program to enter temperature in Celsius and convert it into Fahrenheit.
Write a Python program to enter temperature in Celsius and convert it into Fahrenheit. PROGRAM https://youtu.be/EvFzKRY8y-Q?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU # Python program to convert Celsius to Fahrenheit # Input: Temperature in Celsiuscelsius = float(input(“Enter temperature in Celsius: “)) # Convert to Fahrenheitfahrenheit = (celsius * 9/5) + 32 # Output the resultprint(“Temperature in Fahrenheit:”, fahrenheit) OUTPUT TRY THE […]
Write a Python program to enter length in centimeter and convert it into meter and kilometer.
Write a Python program to enter length in centimeter and convert it into meter and kilometer. PROGRAM https://youtu.be/7MsRO2Iw7fw?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU # Python program to convert length from centimeters to meters and kilometers # Input: Length in centimeterscm = float(input(“Enter length in centimeters: “)) # Convert to meters and kilometersmeter = cm / 100kilometer = cm / 100000 […]
Write a Python program to enter radius of a circle and find its diameter, circumference and area.
Write a Python program to enter radius of a circle and find its diameter, circumference and area. PROGRAM https://youtu.be/gbvjzn5lmkQ?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU import math # Input: Radiusradius = float(input(“Enter the radius of the circle: “)) # Calculate Diameterdiameter = 2 * radius # Calculate Circumferencecircumference = 2 * math.pi * radius # Calculate Areaarea = math.pi * radius […]
Write a Python program to enter length and breadth of a rectangle and find its area.
Write a Python program to enter length and breadth of a rectangle and find its area. PROGRAM https://youtu.be/VTrdc9xGplA?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU # Python program to calculate the area of a rectangle # Input: Length and Breadthlength = float(input(“Enter the length of the rectangle: “))breadth = float(input(“Enter the breadth of the rectangle: “)) # Calculate Areaarea = length * […]
Write a Python program to enter length and breadth of a rectangle and find its perimeter.
Write a Python program to enter length and breadth of a rectangle and find its perimeter. PROGRAM https://youtu.be/j83zw9L2_58?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU # Python program to calculate the perimeter of a rectangle # Input: Length and Breadthlength = float(input(“Enter the length of the rectangle: “))breadth = float(input(“Enter the breadth of the rectangle: “)) # Calculate Perimeterperimeter = 2 * […]
Write a Python program to enter two numbers and perform all arithmetic operations.
Write a Python program to enter two numbers and perform all arithmetic operations. PROGRAM https://youtu.be/V2YVAR9nDj8?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU # Program to perform all arithmetic operations using separate variables # Inputa = float(input(“Enter first number: “))b = float(input(“Enter second number: “)) # Arithmetic operations using different variablesadd = a + bsub = a – bmul = a * bdiv […]
