Neue Datei hinzugefügt

This commit is contained in:
Theresa Nerz & Tahar Lamred 2026-05-20 14:06:39 +00:00
parent 926e57c9e5
commit 73144db537
3 changed files with 30 additions and 0 deletions

1
js/example2.js Normal file
View file

@ -0,0 +1 @@
alert("JavaScript successfully included");

17
js/notenrechner.js Normal file
View file

@ -0,0 +1,17 @@
function berechneNote(punkte) {
if (punkte >= 90) return "sehr gut";
else if (punkte >= 75) return "gut";
else if (punkte >= 60) return "befriedigend";
else if (punkte >= 50) return "ausreichend";
else return "nicht bestanden";
}
const erreichtePunkte = Number(prompt("Geben Sie Ihre Punktzahl ein:"));
const maxPunkte = Number(prompt("Geben Sie die maximale Punktzahl ein:"));
const prozent = (erreichtePunkte / maxPunkte) * 100;
const note = berechneNote(prozent);
console.log(`${erreichtePunkte} von ${maxPunkte} Punkten (${prozent.toFixed(0)}%) = ${note}`);
alert(`${erreichtePunkte} von ${maxPunkte} Punkten (${prozent.toFixed(0)}%) = ${note}`);
alert("Notenrechner-Skript geladen!");

12
js/textanalyse.js Normal file
View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Textanalyse</title>
<script src="js/textanalyse.js" defer></script>
</head>
<body>
<h1>Textanalyse</h1>
<p>Die Analyse startet automatisch.</p>
</body>
</html>