Posts

Showing posts from October, 2025

Slip 22

1 <?php $queue = array(); while (true) {     echo "\n====== Queue Operations ======\n";     echo "1. Insert an element in Queue\n";     echo "2. Delete an element from Queue\n";     echo "3. Display Queue\n";     echo "4. Exit\n";     echo "Enter your choice: ";     $choice = trim(fgets(STDIN));     switch ($choice) {         case 1:             echo "Enter element to insert: ";             $element = trim(fgets(STDIN));             array_push($queue, $element);             echo "Inserted: $element\n";             break;         case 2:             if (empty($queue)) {                 echo "Queue is empty. Cannot delete.\n";       ...

slip.10

1.... (Save by . html) <!DOCTYPE html> <html> <body> <form action="calculate.php" method="post"> <input type="text" name="num1" placeholder="Enter first number">  <input type="text" name="num2" placeholder="Enter second number"> <input type="submit" value="Calculate"> </form> </body> </html> calculate.php <?php function findModulus($num1, $num2) { return $num1 % $num2; } function findPower($num1, $num2) { return pow($num1, $num2); }   function findSum($n) { return ($n * ($n + 1)) / 2; }   findFactorial($num) { if ($num === 0) { return 1; } else { return $num * findFactorial($num - 1); } }  $num1 = $_POST['num1']; $num2 = $_POST['num2']; $modulus = findModulus($num1, $num2); $power = findPower($num1, $num2); $sum = findSum($num1); $factorial = findFactorial($num2); echo "Modulu...

slip.9

1.. Save by . html) <html> <body bgcolor=#c29bb8> <form action="setb2ph1.php" method=get> <pre> Enter any string:<input type=text name=s> Select seperator from following:<select name=s1>  <option> | </option> <option> @ </option> <option> # </option> </select> <input type=submit value=show_output> </pre> </form> </body> </html> ************setb2ph.php*********** <html> <body bgcolor="#67074e"> <?php $str = $_GET['s']; $separator = $_GET['s1']; echo "<br>Given String: $str"; $arr=explode($separator,$str); $words=implode(" ",$arr); echo "<br> String into words: $words"; $str_rep=str_replace($separator,'#',$str); echo "<br>After Replacement: $str_rep"; $lpos=strrpos($str," "); echo "<br>last word in given string:" .sub...

slip.8

(Save by .html <form method="POST" action="setb1ph.php"> <label for="smallString">Small String:</label> <input type="text" name="smallString" id="smallString" required> <label for="bigString">Big String:</label> <input type="text" name="bigString" id="bigString" required>  <input type="submit" value="Submit"> </form> (Save by . setb1ph.php) <?php if ($_SERVER["REQUEST_METHOD"] == "POST") { $smallString = $_POST["smallString"]; $bigString = $_POST["bigString"]; // a. Find whether the small string appears at the start of the large string $startsWith = (strpos($bigString, $smallString) === 0); // b. Find the position of the small string in the big string $position = strpos($bigString, $smallString); // c. Compare both strings for the first n characters (case ins...

slip.7

<!DOCTYPE html> <html> <head> <style> ul { list-style: none; margin: 2px; padding: 3px; } ul li { float: left; padding: 10px; background: orange; text-align: center; margin-left: 5px; } ul li:hover { background: red; opacity: 0.8; color: white; } a { text-decoration: none; color: black; } </style> </head> <body> <h2>List of Books</h2> <ul> <li><a href="#">Home</a></li> <li><a href="#">Java</a></li> <li><a href="#">HTML</a></li> <li><a href="#">CSS</a></li> </ul> </body> </html> 2 import pandas as pd from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import OneHotEncoder from sklearn import preprocessing data = pd.read_csv('Data.csv') df = pd.DataFrame(data) print('\n Displaying Dataset : \n\n', df) enc = preprocessing.OneHotEncoder() enc...

slip.6

1..... <!DOCTYPE html> <html> <head> <title>Layout Example</title> <style> body { margin: 0; font-family: Arial, sans-serif; } header { background-color: #2a6ebd; color: white; padding: 20px; text-align: center; } nav { background-color: #36b5b0; width: 25%; float: left; padding: 20px; height: 400px; box-sizing: border-box; } section { background-color: #f3a41c; width: 75%; float: left; padding: 20px; height: 400px; box-sizing: border-box; } footer { clear: both; background-color: #e33c3c; color: white; text-align: center; padding: 15px; } </style> </head> <body> <header> <h1>Header</h1> </header> <nav> <h2>Menu</h2> </nav> <section> <p> Write one pragragh of 5 lines </p> </section> <footer> <p>Footer</p> </footer> </body> </html> 2.... import pandas as pd import matplotlib.pyplot as plt data = pd.read_csv('Data.csv') ...

slip.5

1. <!DOCTYPE html> <html lang="en">  <head>  <title>Bootstrap Example</title>  <meta charset="utf-8">  <meta name="viewport" content="width=device-width, initial-scale=1">  <link rel="stylesheet"  href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.c  ss">  <script  src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></scrip  t>  <script  src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js">  </script>  </head>  <body>  <div class="jumbotron text-center">  <h1>My First Bootstrap Page</h1>  <p>Resize this responsive page to see the effect!</p>  </div>  <div class="container">  <div class="row"> <div class="col-sm-4">  <h3>Personal Information</h3> <p>Add yo...

slip.4

1. <!DOCTYPE html> <html> <head> <title>Program for Printing Table</title> <style> table, td, th { border: 1px solid black; border-collapse: collapse; padding: 18px; text-align: center; } </style> </head> <body> <h1 align="center">List of Books</h1> <table align="center"> <tr> <td rowspan="2">Item No</td> <td rowspan="2">Item Name</td> <td colspan="2">Price</td> </tr> <tr> <td>Rs.</td> <td>Paise</td> </tr> <tr> <td>1.</td> <td>Programming in Python</td> <td>500</td> <td>50</td> </tr> <tr> <td>2.</td> <td>Programming in Java</td> <td>345</td> <td>65</td> </tr> </table> </body> </html> 2 import pandas as pd import matplotlib.pyplot as plt import nump...

slip.3

1. <!DOCTYPE html> <html> <head> <title>Company Info</title> <style> h1 { background-color: green; color: red; font-family: Comic Sans MS, cursive, sans-serif; text-align: center; padding: 10px; } p { color: blue; font-size: 16px; margin: 20px; } </style> </head> <body> <h1>My Company Name</h1> <p>We are a leading company in innovative solutions, dedicated to providing the best services to our clients.</p> </body> </html> 2 import pandas as pd import matplotlib.pyplot as plt data = pd.read_csv("Iris.csv") new_data = data[["SepalLengthCm", "SepalWidthCm", "PetalLengthCm", "PetalWidthCm"]] print(new_data.head()) new_data.boxplot() plt.title("Box Plot") plt.show() data = pd.read_csv('weight-height.csv') df = pd.DataFrame(data) print('\n Basic Statistical Details of Given Dataset: \n\n', df.describe())

slip.2

<!DOCTYPE html> <html> <head> <title>Pune City</title> <marquee style="background-color:yellow;padding:20px;font-size:20px;"> Pune city is best for education. </marquee> </head> <body style="background-color:pink;"> <h1 style="color:blue;font-size:large;">Pune City</h1> <ul> <li style="font-size:17px;">Landmarks:</li> <ul> <li style="color:red;font-size:11px;">Kothrud</li> <li style="color:orange;font-size:12px;">Morya Gosawi</li> <li style="color:green;font-size:13px;">Dagdusheth</li> <li style="color:aqua;font-size:14px;">Alandi</li> </ul> </ul> <img src="file:///C:/Users/dpo77/OneDrive/Desktop/webTechnology/HTML-%20DEMO-PGM/images/rose.jpg" height="300" width="500"> </body> </html> 2 import pandas as pd import...

Slip No.1

<!DOCTYPE html> <html> <head> <title>Project Management</title> </head> <body style="background-color: yellow;"> <h1>Project Management</h1> <form> <label>Project Name:</label> <input type="text" name="projectName" value="project name"><br><br> <label>Assigned to:</label> <select name="assignedTo"> <option>Er Merry Petision</option> </select><br><br> <label>Start Date:</label> <input type="date" name="startDate"><br><br> <label>End Date:</label> <input type="date" name="endDate"><br><br> <label>Priority:</label> <input type="radio" name="priority" value="High">High <input type="radio" name="priority" value="Average">Aver...