Posts

Showing posts from April, 2024

python

 Q.Write a Python program to find number is greater or smaller from list which is named mylist. Write manual code ans) # Define the list mylist = [5, 10, 3, 8, 15] # Initialize variables to store the greater and smaller numbers greater_number = mylist[0] smaller_number = mylist[0] # Iterate through the list for num in mylist:     if num > greater_number:         greater_number = num     elif num < smaller_number:         smaller_number = num # Print the results print("Greater number:", greater_number) print("Smaller number:", smaller_number) Q.Demonstrate various operations on String and tuple. String is " Hello friends how are you", Tuple name is MyTuple ans) # Define the string my_string = "Hello friends how are you" # 1. Length of the string print("Length of the string:", len(my_string)) # 2. Accessing characters by index print("Character at index 7:", my_string[7]) # 3. Slicing print("Sliced substring from index

php

  1)Create student registration form with name,address,contact,gender,course,languages known,email,password(encrypted) with name ,email and password required. ans) <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Student Registration Form</title> </head> <body>     <h2>Student Registration Form</h2>     <form action="registration_process.php" method="post">         <label for="name">Name:</label><br>         <input type="text" id="name" name="name" required><br><br>         <label for="address">Address:</label><br>         <input type="text" id="address" name="address"><br><br>         <label for="