-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchemie-proton-neutron-electron-nuklide-test.html
149 lines (143 loc) · 3.84 KB
/
chemie-proton-neutron-electron-nuklide-test.html
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Elementarteilchen Quiz</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f4f4f9;
color: #333;
}
h1 {
text-align: center;
color: #4CAF50;
}
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
th, td {
border: 1px solid #ddd;
padding: 15px;
text-align: center;
}
th {
background-color: #4CAF50;
color: white;
}
input {
width: 80%;
padding: 10px;
text-align: center;
font-size: 16px;
}
.nuklid {
font-size: 1.2em;
font-weight: bold;
}
.result {
margin-top: 20px;
font-weight: bold;
text-align: center;
}
.result.correct {
color: #4CAF50;
}
.result.incorrect {
color: #f44336;
}
button {
display: block;
width: 100%;
padding: 15px;
background: #4CAF50;
color: white;
border: none;
border-radius: 4px;
font-size: 18px;
cursor: pointer;
transition: background 0.3s ease;
}
button:hover {
background: #45a049;
}
</style>
</head>
<body>
<h1>Elementarteilchen Quiz</h1>
<p>Füllen Sie die fehlenden Werte in der Tabelle aus:</p>
<table>
<tr>
<th>Protonen</th>
<th>Neutronen</th>
<th>Elektronen</th>
<th>Nuklid</th>
</tr>
<tr>
<td>24</td>
<td>29</td>
<td><input type="number" id="electrons1"></td>
<td class="nuklid"><sup>53</sup>Cr<sup>3+</sup></td>
</tr>
<tr>
<td><input type="number" id="protons2"></td>
<td><input type="number" id="neutrons2"></td>
<td>28</td>
<td class="nuklid"><sup>70</sup>Ga<sup>3+</sup></td>
</tr>
<tr>
<td>6</td>
<td>8</td>
<td><input type="number" id="electrons3"></td>
<td class="nuklid"><sup>14</sup>C</td>
</tr>
<tr>
<td>11</td>
<td>12</td>
<td><input type="number" id="electrons4"></td>
<td class="nuklid"><sup>23</sup>Na<sup>+</sup></td>
</tr>
<tr>
<td><input type="number" id="protons5"></td>
<td>18</td>
<td>18</td>
<td class="nuklid"><sup>34</sup>S<sup>2-</sup></td>
</tr>
</table>
<button onclick="checkAnswers()">Antworten überprüfen</button>
<div id="result" class="result"></div>
<script>
function checkAnswers() {
const answers = {
electrons1: "21",
protons2: "31",
neutrons2: "39",
electrons3: "6",
electrons4: "10",
protons5: "16"
};
let correct = 0;
let total = Object.keys(answers).length;
for (let key in answers) {
const userInput = document.getElementById(key).value.trim();
if (userInput === answers[key]) {
correct++;
}
}
const resultDiv = document.getElementById('result');
if (correct === total) {
resultDiv.textContent = "Herzlichen Glückwunsch! Alle Antworten sind richtig!";
resultDiv.className = "result correct";
} else {
resultDiv.textContent = `Sie haben ${correct} von ${total} Fragen richtig beantwortet. Bitte versuchen Sie es erneut!`;
resultDiv.className = "result incorrect";
}
}
</script>
</body>
</html>