From 5c1dfd7786dcd5f6c9ca3c4cf7a7a5507e121c17 Mon Sep 17 00:00:00 2001 From: lena_smd02 Date: Tue, 9 Jun 2026 16:51:40 +0000 Subject: [PATCH] JS-Uebungen hinzugefuegt --- eis_projekt.html | 3 +++ impressum.html | 3 +++ index.html | 5 +++-- js/notenrechner.js | 25 +++++++++++++++++++++++++ js/textanalyse.js | 11 +++++++++++ kontakt.html | 4 ++++ notenrechner.html | 38 ++++++++++++++++++++++++++++++++++++++ textanalyse.html | 39 +++++++++++++++++++++++++++++++++++++++ ueber_uns.html | 6 ++++-- 9 files changed, 130 insertions(+), 4 deletions(-) create mode 100644 js/notenrechner.js create mode 100644 js/textanalyse.js create mode 100644 notenrechner.html create mode 100644 textanalyse.html diff --git a/eis_projekt.html b/eis_projekt.html index c3966a4..ffeccf0 100644 --- a/eis_projekt.html +++ b/eis_projekt.html @@ -5,6 +5,7 @@ EIS Projekt – Lena + @@ -15,11 +16,13 @@
  • EIS Projekt
  • Kontakt
  • Impressum
  • +
  • Notenrechner
  • + Logo

    Mein EIS Projekt

    Interaktive Softwareanwendungen – Sommersemester 2025

    diff --git a/impressum.html b/impressum.html index 22443dd..fabe1d5 100644 --- a/impressum.html +++ b/impressum.html @@ -5,6 +5,7 @@ Impressum – Lena + @@ -15,11 +16,13 @@
  • EIS Projekt
  • Kontakt
  • Impressum
  • +
  • Notenrechner
  • + Logo

    Impressum

    diff --git a/index.html b/index.html index 92adfb4..0c77212 100644 --- a/index.html +++ b/index.html @@ -17,6 +17,7 @@
  • EIS Projekt
  • Kontakt
  • Impressum
  • +
  • Notenrechner
  • @@ -24,7 +25,7 @@ Logo

    Willkommen auf meiner Seite!

    Einführung in interaktive Softwareanwendungen – SoSe 2025

    -

    Yippie!

    +
    @@ -34,6 +35,6 @@
    - + diff --git a/js/notenrechner.js b/js/notenrechner.js new file mode 100644 index 0000000..2c5972c --- /dev/null +++ b/js/notenrechner.js @@ -0,0 +1,25 @@ +let punktzahl = prompt(); +let maxPunktzahl = prompt(); + +function berechneNote(punkte) { +if (punkte >= 90 && punkte <= 100){ + return "sehr gut"; +} +if (punkte >= 75 && punkte <= 89){ + return "gut"; +} +if (punkte >= 60 && punkte <= 74){ + return "befriedigend"; +} +if (punkte >= 50 && punkte <= 59){ + return "ausreichend"; +} +if (punkte < 50){ + return "nicht bestanden"; +} +} +let prozentsatz = (punktzahl / maxPunktzahl) *100 +let note = berechneNote(prozentsatz); +alert(punktzahl+" von "+maxPunktzahl+" Punkten ("+prozentsatz+"%) = "+note); + + diff --git a/js/textanalyse.js b/js/textanalyse.js new file mode 100644 index 0000000..ad5ef3b --- /dev/null +++ b/js/textanalyse.js @@ -0,0 +1,11 @@ +let text = prompt(); +function analyseText(text){ + return `Anzahl der Zeichen: ${text.length}\n Anzahl der Wörter: ${text.split(" ").length}\n Text in Großbuchstaben: ${text.toUpperCase()}` +} + +if (text.length == 0) { + alert("Fehler"); +} else { + + alert(analyseText(text)); +} diff --git a/kontakt.html b/kontakt.html index a6dc896..37e8476 100644 --- a/kontakt.html +++ b/kontakt.html @@ -4,8 +4,10 @@ Kontakt – Lena +