OneCompiler

Hslip1

129

Q1]

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Styled Form</title> <style> body { font-family: Arial, sans-serif; }
form {
  max-width: 400px;
  margin: 20px auto;
  padding: 20px;
  background-color: #ffffcc; /* yellow background */
  border: 1px solid #ccc;
  border-radius: 8px;
}

h1 {
  font-size: 6pt; /* font size 6pt */
  color: red; /* red text color */
}

label {
  display: block;
  margin: 10px 0 5px;
}

input, select {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

button {
  background-color: #4CAF50;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #45a049;
}
</style> </head> <body> <form> <h1>Styled Form</h1>
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>

<label for="email">Email:</label>
<input type="email" id="email" name="email" required>

<label for="age">Age:</label>
<input type="number" id="age" name="age" required>

<label for="gender">Gender:</label>
<select id="gender" name="gender" required>
  <option value="male">Male</option>
  <option value="female">Female</option>
</select>

<button type="submit">Submit</button>
</form> </body> </html>

Q2]
import pandas as pd
import matplotlib.pyplot as plt

Load Iris data

iris_data = pd.read_csv('iris.csv')

Get the frequency of the three species

species_counts = iris_data['species'].value_counts()

Create a Pie plot

plt.figure(figsize=(8, 8))
plt.pie(species_counts, labels=species_counts.index, autopct='%1.1f%%', startangle=140)
plt.title('Iris Species Distribution')
plt.show()

B]
import pandas as pd

Load wine data

wine_data = pd.read_csv('wineequality-red.csv')

View basic statistical details

statistical_details = wine_data.describe()
print(statistical_details)