diff --git a/2.Erste Programme/2.BubbleSort Scratch/6.sb2 b/2.Erste Programme/2.BubbleSort Scratch/6.sb2 index 2640e85..70f0fa8 100644 Binary files a/2.Erste Programme/2.BubbleSort Scratch/6.sb2 and b/2.Erste Programme/2.BubbleSort Scratch/6.sb2 differ diff --git a/2.Erste Programme/5. Notendurschnittberechnung/main.py b/2.Erste Programme/5. Notendurschnittberechnung/main.py new file mode 100644 index 0000000..51fb024 --- /dev/null +++ b/2.Erste Programme/5. Notendurschnittberechnung/main.py @@ -0,0 +1,58 @@ +def init(): + print("Hallo und willkommen zum Endnotenberchnungsprogramm!") + print("Bitte gib an, welches Programm du starten willst:") + print("1. Endnotenberechnung mit Kursarbeit") + print("2. Endnotenberechnung ohne Kursarbeit") + user_input = input() + if user_input == "1": + main() + elif user_input == "2": + ohne_kursarbeit() + else: + print("Bitte nur 1 oder 2 eingeben") + init() +def main(): + print("Hallo und willkommen zum Endnotenberchnungsprogramm!") + print("Bitte gib die Anzahl der normalen Noten ein:") + normale_noten = input() + # Make an Array with the these numbers + normale_noten_array = [] + for i in range(0, int(normale_noten)): + print("Bitte gib die Note ein:") + note = int(input()) + normale_noten_array.append(note) + alle_noten_zusammen = sum(normale_noten_array) + # Get Avarage of the normal Notes + avarage_normale_noten = alle_noten_zusammen / int(normale_noten) + # Multiply avarage of the normal notes with 2/3 + avarage_normale_noten_2_3 = avarage_normale_noten * 2 / 3 + print("Bitte gib die Note der Kursarbeit ein:") + kursarbeit = int(input()) + kursarbeit_1_3 = kursarbeit * 1 / 3 + endnote = int(kursarbeit_1_3) + int(avarage_normale_noten_2_3) + print("Deine Endnote ist: " + str(endnote)) + +def ohne_kursarbeit(): + print("Hallo und willkommen zum Endnotenberchnungsprogramm!") + print("Bitte gib die Anzahl der normalen Noten ein:") + normale_noten = input() + # Make an Array with the these numbers + normale_noten_array = [] + for i in range(0, int(normale_noten)): + print("Bitte gib die Note ein:") + note = int(input()) + normale_noten_array.append(note) + alle_noten_zusammen = sum(normale_noten_array) + # Get Avarage of the normal Notes + avarage_normale_noten = alle_noten_zusammen / int(normale_noten) + + print(avarage_normale_noten) + +init() +print("Nochmal rechnen ((J)a/(N)ein)?") +start = input() +if start == "J" or start == "ja": + init() +else: + print("Auf Wiedersehen!") + exit() diff --git a/2.Erste Programme/6. Spielerei/03.02.2022.py b/2.Erste Programme/6. Spielerei/03.02.2022.py new file mode 100644 index 0000000..a11b1f9 --- /dev/null +++ b/2.Erste Programme/6. Spielerei/03.02.2022.py @@ -0,0 +1,8 @@ +print("Hallo und Willkommen zum Taschenrechner") +print("Dieser Taschenrechner kann nur addieren.") +print("Bitte gib die erste Zahl ein:") +zahl1 = int(input()) +print("Bitte gib die zweite Zahl ein:") +zahl2 = int(input()) +print("Die Summe lautet:", zahl1 + zahl2) +exit() \ No newline at end of file