def fibonacci(n): fib_series = [0, 1] while len(fib_series) < n: fib_series.append(fib_series[-1] + fib_series[-2]) return fib_series
n = int(input("Enter the number of terms in the Fibonacci series: ")) print(f"Fibonacci series up to {n} terms: {fibonacci(n)}")
#HTML
<title>Login Page</title> <script src="script.js"></script>#css
body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; font-family: Arial, sans-serif; background-color: #f0f0f0; }
.login-container { background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); width: 300px; text-align: center; }
.login-container h2 { margin-bottom: 20px; }
.input-group { margin-bottom: 15px; }
.input-group label { display: block; margin-bottom: 5px; text-align: left; }
.input-group input { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; }
button { width: 100%; padding: 10px; background-color: #007bff; border: none; border-radius: 4px; color: #fff; font-size: 16px; cursor: pointer; }
button:hover { background-color: #0056b3; }
.error-message { color: red; margin-top: 10px; }
#javascript
document.getElementById('loginForm').addEventListener('submit', function(event) { event.preventDefault(); const username = document.getElementById('username').value; const password = document.getElementById('password').value; const errorMessage = document.getElementById('errorMessage');
if (username === 'admin' && password === 'password') {
alert('Login successful!');
errorMessage.textContent = '';
} else {
errorMessage.textContent = 'Invalid username or password';
}
});