-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata analysis tool
107 lines (104 loc) · 3.42 KB
/
data analysis tool
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<html>
<head>
<title>Data Analysis Tool</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Roboto', sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
}
.container {
width: 80%;
margin: 0 auto;
padding: 20px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
margin-top: 50px;
}
h1 {
text-align: center;
color: #333;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 5px;
color: #555;
}
.form-group input {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
}
.form-group button {
width: 100%;
padding: 10px;
background-color: #28a745;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}
.form-group button:hover {
background-color: #218838;
}
.results {
margin-top: 30px;
}
.results h2 {
color: #333;
}
.results p {
font-size: 18px;
color: #555;
}
</style>
</head>
<body>
<div class="container">
<h1>Data Analysis Tool</h1>
<div class="form-group">
<label for="salary">Monthly Salary ($):</label>
<input type="number" id="salary" placeholder="Enter your monthly salary">
</div>
<div class="form-group">
<label for="expenses">Monthly Expenses ($):</label>
<input type="number" id="expenses" placeholder="Enter your monthly expenses">
</div>
<div class="form-group">
<label for="savings">Monthly Savings ($):</label>
<input type="number" id="savings" placeholder="Enter your monthly savings">
</div>
<div class="form-group">
<button onclick="calculate()">Calculate</button>
</div>
<div class="results" id="results">
<h2>Results</h2>
<p id="totalIncome"></p>
<p id="totalExpenses"></p>
<p id="totalSavings"></p>
</div>
</div>
<script>
function calculate() {
var salary = parseFloat(document.getElementById('salary').value);
var expenses = parseFloat(document.getElementById('expenses').value);
var savings = parseFloat(document.getElementById('savings').value);
var totalIncome = salary * 12;
var totalExpenses = expenses * 12;
var totalSavings = savings * 12;
document.getElementById('totalIncome').innerText = 'Total Annual Income: $' + totalIncome.toFixed(2);
document.getElementById('totalExpenses').innerText = 'Total Annual Expenses: $' + totalExpenses.toFixed(2);
document.getElementById('totalSavings').innerText = 'Total Annual Savings: $' + totalSavings.toFixed(2);
}
</script>
</body>
</html>