Write a Python program to find maximum between two numbers.

Write a Python program to find maximum between two numbers. PROGRAM # Program to find the maximum between two numbers # Take input from the usernum1 = float(input(“Enter the first number: “))num2 = float(input(“Enter the second number: “)) # Compare the numbersif num1 > num2:print(f”The maximum number is: {num1}”)elif num2 > num1:print(f”The maximum number is: […]

Write a Python program to find maximum between three numbers.

Write a Python program to find maximum between three numbers. PROGRAM # Program to find the maximum between three numbers # Take input from the usernum1 = float(input(“Enter the first number: “))num2 = float(input(“Enter the second number: “))num3 = float(input(“Enter the third number: “)) # Compare the numbersif num1 >= num2 and num1 >= num3:print(f”The […]

Unit 3 : Shell Scripting in Linux

Unit 3 : Shell Scripting in Linux Unit 3 : Shell Scripting in Linux 3.1 Creating and Executing Shell Scripts (nano, vi, ./script.sh) 3.2 Shell Metacharacters and Operators 3.2.1 Filename Expansion (wildcards: *, ?, []) 3.2.2 Input/Output Redirection (>, >>, <) 3.2.3 Pipes (|) 3.2.4 Command Substitution ($(…), …) 3.3 Control Flow Structures (if-else, case, […]

Unit 3: Database Interaction and CodeIgniter Framework

Unit 3: Database Interaction and CodeIgniter Framework Database Interaction and CodeIgniter Framework NOTES 3.1 PHP with MySQL/MongoDB Introduction to PHP PHP (Hypertext Preprocessor) is a server-side scripting language used to create dynamic and interactive web pages. It is widely used with databases to store, retrieve, and manage data. Server-side: Code is executed on the server. […]

Write a Python program to enter P, T, R and calculate Simple Interest.

Write a Python program to enter P, T, R and calculate Simple Interest. PROGRAM https://youtu.be/V2YVAR9nDj8?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU # Input principal, time and rateP = float(input(“Enter the Principal amount (P): “))T = float(input(“Enter the Time in years (T): “))R = float(input(“Enter the Rate of interest (R): “)) # Calculate Simple InterestSI = (P * T * R) / […]

Write a Python program to enter marks of five subjects and calculate total, average and percentage.

Write a Python program to enter marks of five subjects and calculate total, average and percentage. PROGRAM https://youtu.be/V2YVAR9nDj8?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU # Input marks of five subjectsmark1 = float(input(“Enter marks of Subject 1: “))mark2 = float(input(“Enter marks of Subject 2: “))mark3 = float(input(“Enter marks of Subject 3: “))mark4 = float(input(“Enter marks of Subject 4: “))mark5 = float(input(“Enter marks […]

Write a Python program to calculate area of an equilateral triangle.

Write a Python program to calculate area of an equilateral triangle. PROGRAM https://youtu.be/V2YVAR9nDj8?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU import math # Input the side of the equilateral triangleside = float(input(“Enter the side of the equilateral triangle: “)) # Calculate the areaarea = (math.sqrt(3) / 4) * side * side # Display the resultprint(f”The area of the equilateral triangle is: {area:.2f} […]

Write a Python program to enter base and height of a triangle and find its area.

Write a Python program to enter base and height of a triangle and find its area. PROGRAM https://youtu.be/V2YVAR9nDj8?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU # Python program to find the area of a triangle # Input base and height from the userbase = float(input(“Enter the base of the triangle: “))height = float(input(“Enter the height of the triangle: “)) # Calculate areaarea […]

Write a Python program to enter two angles of a triangle and find the third angle.

Write a Python program to enter two angles of a triangle and find the third angle. PROGRAM https://youtu.be/V2YVAR9nDj8?list=PLzyEFfpN3YawUfVOgviI7CggbNW434dqU # Python program to find the third angle of a triangle (no if-else) # Input two angles from the userangle1 = float(input(“Enter the first angle of the triangle: “))angle2 = float(input(“Enter the second angle of the triangle: […]